<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Osgi on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/osgi/</link>
    <description>Recent content in Osgi on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Mon, 17 Apr 2017 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/osgi/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Snippet: Java 9 Modules and JPMS</title>
      <link>https://www.hascode.com/snippet-java-9-modules-and-jpms/</link>
      <pubDate>Mon, 17 Apr 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-9-modules-and-jpms/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Playing around with the new module system in Java 9 I simply wanted to write down how to achieve the most basic tasks.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Therefore I created the following module how-to based upon a simple demonstration project consisting of two dependant modules.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;component-diagram.png&#34; alt=&#34;component diagram&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Modules Component-Diagram&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites_and_setup&#34;&gt;Prerequisites and Setup&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We need an early access build of the Java ™ 9 JDK, available for download &lt;a href=&#34;https://jdk9.java.net/download/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition we should make sure, that our environment variable &lt;em&gt;JAVA_HOME&lt;/em&gt; is set to the corresponding directory and calling &lt;em&gt;java -version&lt;/em&gt; returns something similar to this:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Wiring made easy using OSGi Blueprint and Apache Karaf</title>
      <link>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</link>
      <pubDate>Mon, 16 Apr 2012 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/wiring-made-easy-using-osgi-blueprint-and-apache-karaf/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code.&lt;br/&gt;
In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled…&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Confluence Social Comments Plugin</title>
      <link>https://www.hascode.com/confluence-social-comments-plugin/</link>
      <pubDate>Mon, 30 May 2011 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/confluence-social-comments-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;logo.png&#34; alt=&#34;logo&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have created a new, free plugin for Confluence, the popular enterprise wiki.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The plugin allows you to notify users of ongoing discussions in comments on a confluence page by posting a specific token including the user’s name like this: “@username:”&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_features&#34;&gt;Features&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Configurable notification settings in the administration area&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Several placeholders to be used in the e-mail template for the notifications&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User filtering to avoid sending duplicate e-mails&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For more detailed information take a look at the Maven generated &lt;a href=&#34;http://app.hascode.com/social-comments-plugin&#34;&gt;project website&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a Confluence SOAP Component in 5 Minutes</title>
      <link>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</link>
      <pubDate>Sun, 24 Oct 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-confluence-soap-component-in-5-minutes/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You’re using the popular Confluence wiki? You’re using its RPC/SOAP API and missing a function you really need? Just extend the  capabilities of the Confluence RPC API by programming a custom web service component – it is really easy and also &lt;a href=&#34;http://confluence.atlassian.com/display/CONFDEV/RPC+Module&#34;&gt;well documented&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we’re going to take a look on how to quickly implement a SOAP service, securing it and putting its methods in a transactional context.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://maven.apache.org&#34;&gt;Maven&lt;/a&gt; &amp;gt;=2&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;JDK&lt;/a&gt; &amp;gt;= 5&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.atlassian.com/software/confluence/&#34;&gt;Confluence Wiki&lt;/a&gt; &amp;gt;= 3.0 (for a quick installation guide take a look at &lt;a href=&#34;https://www.hascode.com/2010/03/confluence-developer-instance-quick-setup/&#34;&gt;this article&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.soapui.org/&#34;&gt;SoapUI&lt;/a&gt; for Testing&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to create a simple OSGi Web Application using Maven</title>
      <link>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</link>
      <pubDate>Sun, 25 Jul 2010 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/how-to-create-a-simple-osgi-web-application-using-maven/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;So lets develop some bundles ..&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You are going to need a &lt;a href=&#34;http://java.sun.com/javase/downloads/index.jsp&#34;&gt;JDK&lt;/a&gt; (&amp;gt;=5), &lt;a href=&#34;http://maven.apache.org/&#34;&gt;Maven2&lt;/a&gt;, the &lt;a href=&#34;http://felix.apache.org&#34;&gt;Apache Felix OSGi implementation&lt;/a&gt; and and text editor/http://eclipse.org/[IDE] of your choice.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Atlassian Snippets</title>
      <link>https://www.hascode.com/atlassian-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/atlassian-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_disable_yui_compressor&#34;&gt;Disable YUI compressor&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&amp;lt;plugin&amp;gt;
    &amp;lt;groupId&amp;gt;com.atlassian.maven.plugins&amp;lt;/groupId&amp;gt;
    &amp;lt;artifactId&amp;gt;maven-jira-plugin&amp;lt;/artifactId&amp;gt;
    &amp;lt;version&amp;gt;${amps.version}&amp;lt;/version&amp;gt;
    &amp;lt;extensions&amp;gt;true&amp;lt;/extensions&amp;gt;
    &amp;lt;configuration&amp;gt;
        &amp;lt;compressResources&amp;gt;false&amp;lt;/compressResources&amp;gt;
        [..]
    &amp;lt;/configuration&amp;gt;
&amp;lt;/plugin&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_favourites_by_user&#34;&gt;Confluence – Get favourites by user&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the label manager.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;List getFavouriteSpaces(String username)&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_determine_the_base_url&#34;&gt;Confluence – Determine the base URL&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the SettingsManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String baseUrl = settingsManager.getGlobalSettings().getBaseUrl();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_get_the_context_path&#34;&gt;Confluence – Get the context path&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using the BootstrapManager:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;String contextPath = bootstrapManager.getWebAppContextPath();&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_confluence_using_velocity_template_for_a_macro&#34;&gt;Confluence – Using Velocity Template for a Macro&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;final VelocityContext contextMap = new VelocityContext(MacroUtils.defaultVelocityContext());

contextMap.put(&amp;#34;key&amp;#34;, obj); // references obj as variable named $key in the velocity template

VelocityUtils.getRenderedTemplate(&amp;#34;path/to/template.vm&amp;#34;, contextMap);&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
