<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Annotations for OSGi Declarative Services</title>
	<atom:link href="http://www.toedter.com/blog/?feed=rss2&#038;p=46" rel="self" type="application/rss+xml" />
	<link>http://www.toedter.com/blog/?p=46</link>
	<description>Java, Eclipse, OSGi, and other cool stuff</description>
	<lastBuildDate>Thu, 19 Aug 2010 16:13:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: 3 variations on OSGi themes: part 8 &#171; CodingAndBeyond</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-16451</link>
		<dc:creator>3 variations on OSGi themes: part 8 &#171; CodingAndBeyond</dc:creator>
		<pubDate>Sat, 15 Aug 2009 19:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-16451</guid>
		<description>[...] First impressions. From the OSGi application developer&#8217;s point of view, the most attractive from the three systems is OSGi DS, because it adds bare minimum to the OSGi framework to free application developers from the need to use &#8216;native&#8217; OSGi API. In particular, it eliminates the need for bundle activators and service trackers or listeners for a relatively small price. On the good side of OSGi DS is flexible dynamic control over service dependencies, including service availability monitoring and configurable restart of importer component when imported service is updated. On the bad side, hovewer, is that component classes are not really POJOs. Another advantage is that OSGi DS specifications are included in the standard OSGi Compendium, so it&#8217;s expected to be available as a part of OSGi Framework implementation. Indeed, Equinox 3.5.0 has already included DS in its standard configuration. One useful improvement that can be added to OSGi DS is implementing support for Java annotations, as proposed, for instance, by Kai Tödter. [...]</description>
		<content:encoded><![CDATA[<p>[...] First impressions. From the OSGi application developer&#8217;s point of view, the most attractive from the three systems is OSGi DS, because it adds bare minimum to the OSGi framework to free application developers from the need to use &#8216;native&#8217; OSGi API. In particular, it eliminates the need for bundle activators and service trackers or listeners for a relatively small price. On the good side of OSGi DS is flexible dynamic control over service dependencies, including service availability monitoring and configurable restart of importer component when imported service is updated. On the bad side, hovewer, is that component classes are not really POJOs. Another advantage is that OSGi DS specifications are included in the standard OSGi Compendium, so it&#8217;s expected to be available as a part of OSGi Framework implementation. Indeed, Equinox 3.5.0 has already included DS in its standard configuration. One useful improvement that can be added to OSGi DS is implementing support for Java annotations, as proposed, for instance, by Kai Tödter. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 3 variations on OSGi themes &#171; CodingAndBeyond</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-16376</link>
		<dc:creator>3 variations on OSGi themes &#171; CodingAndBeyond</dc:creator>
		<pubDate>Sat, 25 Jul 2009 00:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-16376</guid>
		<description>[...] Declarative Services (DS) exist in OSGi Service Compendium specifications since release 4 and continue evolving in later releases. Perhaps, the earliest practical introduction to DS can be found in Neil Bartlett’s &#8216;point-free blog&#8217; (see Getting Started with OSGi, parts 7, 8). Reference implementation of DS provided by Equinox OSGi (see Equinox bundles) utilizes XML descriptors, as specified in the OSGi Service Compendium document. There are also early attempts to introduce annotations for OSGi DS (see Kai&#8217;s Blog), but in this project, I&#8217;m going to use standard Equinox implementation. [...]</description>
		<content:encoded><![CDATA[<p>[...] Declarative Services (DS) exist in OSGi Service Compendium specifications since release 4 and continue evolving in later releases. Perhaps, the earliest practical introduction to DS can be found in Neil Bartlett’s &#8216;point-free blog&#8217; (see Getting Started with OSGi, parts 7, 8). Reference implementation of DS provided by Equinox OSGi (see Equinox bundles) utilizes XML descriptors, as specified in the OSGi Service Compendium document. There are also early attempts to introduce annotations for OSGi DS (see Kai&#8217;s Blog), but in this project, I&#8217;m going to use standard Equinox implementation. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 3 variations on OSGi themes: part 5 &#171; CodingAndBeyond</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-16373</link>
		<dc:creator>3 variations on OSGi themes: part 5 &#171; CodingAndBeyond</dc:creator>
		<pubDate>Wed, 22 Jul 2009 22:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-16373</guid>
		<description>[...] Declarative Services (DS) exist in OSGi Compendium specifications since release 4 and continue evolving in later releases. Perhaps, the earliest practical introduction to DS can be found in Neil Bartlett’s &#8216;point-free blog&#8217; (see Getting Started with OSGi, parts 7, 8). Reference implementation of DS is provided by Equinox OSGi (see Equinox bundles), so it was a natural choice for me to use Eclipse IDE for developing this version of the code. Existing OSGi DS implementation uses XML descriptors, as specified in the OSGi Compendium document. There are also early attempts to introduce annotations for OSGi DS (see Kai&#8217;s Blog), but in this project, I&#8217;m going to use standard implementation. [...]</description>
		<content:encoded><![CDATA[<p>[...] Declarative Services (DS) exist in OSGi Compendium specifications since release 4 and continue evolving in later releases. Perhaps, the earliest practical introduction to DS can be found in Neil Bartlett’s &#8216;point-free blog&#8217; (see Getting Started with OSGi, parts 7, 8). Reference implementation of DS is provided by Equinox OSGi (see Equinox bundles), so it was a natural choice for me to use Eclipse IDE for developing this version of the code. Existing OSGi DS implementation uses XML descriptors, as specified in the OSGi Compendium document. There are also early attempts to introduce annotations for OSGi DS (see Kai&#8217;s Blog), but in this project, I&#8217;m going to use standard implementation. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jose G</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-15953</link>
		<dc:creator>Jose G</dc:creator>
		<pubDate>Thu, 16 Apr 2009 10:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-15953</guid>
		<description>I like this idea, very very nifty feature. To be honest, the XML way to declare services looks like a small step ahead if you compare it with the annotations way. I definitively give support to this idea and I hope to see it included in the specs very soon.</description>
		<content:encoded><![CDATA[<p>I like this idea, very very nifty feature. To be honest, the XML way to declare services looks like a small step ahead if you compare it with the annotations way. I definitively give support to this idea and I hope to see it included in the specs very soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kai Tödter</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-15234</link>
		<dc:creator>Kai Tödter</dc:creator>
		<pubDate>Thu, 26 Feb 2009 08:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-15234</guid>
		<description>I wrote a Wiki page with instructions how to browse and test the examples, see http://max-server.myftp.org/trac/pm/wiki/a4ds</description>
		<content:encoded><![CDATA[<p>I wrote a Wiki page with instructions how to browse and test the examples, see <a href="http://max-server.myftp.org/trac/pm/wiki/a4ds" rel="nofollow">http://max-server.myftp.org/trac/pm/wiki/a4ds</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kai Tödter</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-15200</link>
		<dc:creator>Kai Tödter</dc:creator>
		<pubDate>Wed, 25 Feb 2009 14:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-15200</guid>
		<description>@Philipp,

Not yet, but it could. Currently you have to specify the header manually in the MANIFEST.MF:
Service-Component: OSGI-INF/*
This leads to the loading of all xml files in the OSGI-INF directory</description>
		<content:encoded><![CDATA[<p>@Philipp,</p>
<p>Not yet, but it could. Currently you have to specify the header manually in the MANIFEST.MF:<br />
Service-Component: OSGI-INF/*<br />
This leads to the loading of all xml files in the OSGI-INF directory</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philipp Kursawe</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-15198</link>
		<dc:creator>Philipp Kursawe</dc:creator>
		<pubDate>Wed, 25 Feb 2009 13:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-15198</guid>
		<description>Does the AP also modify the MANIFEST.MF?</description>
		<content:encoded><![CDATA[<p>Does the AP also modify the MANIFEST.MF?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Stanchfield</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-15000</link>
		<dc:creator>Scott Stanchfield</dc:creator>
		<pubDate>Fri, 20 Feb 2009 19:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-15000</guid>
		<description>Hehehe... I just did something like this the other day. Mine looks like

@Component(name=&quot;sampleService&quot;, immediate=true,
  services={@Service(IService.class)},
  references={
    @ServiceReference(name=&quot;x&quot;, iface=ActionListener.class, 
                      bind=&quot;addActionListener&quot;,
                      unbind=&quot;removeActionListener&quot;,
                      cardinality=Cardinality.ZeroOrMore
    )
  }
)

This generates a separate component.xml for each service class.

The problem is that if you have more than one service class, updating the manifest.mf gets wonky.

If you&#039;re doing a full build, the annotation processor knows about all the services and can properly set up the Service-Component header in the manifest.

If you&#039;re doing an incremental build, it only knows about the classes that require rebuild...

I could have it add to Service-Component if it doesn&#039;t exist, but then there&#039;s no good way to remove obsolete entries.

Any thoughts?

If you&#039;re interested in seeing what I&#039;ve got, please email me: scott@javadude.com</description>
		<content:encoded><![CDATA[<p>Hehehe&#8230; I just did something like this the other day. Mine looks like</p>
<p>@Component(name=&#8221;sampleService&#8221;, immediate=true,<br />
  services={@Service(IService.class)},<br />
  references={<br />
    @ServiceReference(name=&#8221;x&#8221;, iface=ActionListener.class,<br />
                      bind=&#8221;addActionListener&#8221;,<br />
                      unbind=&#8221;removeActionListener&#8221;,<br />
                      cardinality=Cardinality.ZeroOrMore<br />
    )<br />
  }<br />
)</p>
<p>This generates a separate component.xml for each service class.</p>
<p>The problem is that if you have more than one service class, updating the manifest.mf gets wonky.</p>
<p>If you&#8217;re doing a full build, the annotation processor knows about all the services and can properly set up the Service-Component header in the manifest.</p>
<p>If you&#8217;re doing an incremental build, it only knows about the classes that require rebuild&#8230;</p>
<p>I could have it add to Service-Component if it doesn&#8217;t exist, but then there&#8217;s no good way to remove obsolete entries.</p>
<p>Any thoughts?</p>
<p>If you&#8217;re interested in seeing what I&#8217;ve got, please email me: <a href="mailto:scott@javadude.com">scott@javadude.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jörg Matysiak</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-14972</link>
		<dc:creator>Jörg Matysiak</dc:creator>
		<pubDate>Fri, 20 Feb 2009 07:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-14972</guid>
		<description>Hi Kai,

very cool!

This is exactly what I&#039;m missing in the current DS implementation. Would be nice to have the thing as ant plug-in. :)

Having all the information in one file (the java source file) is much simpler to manage
than the current way using component.xml.

Although the new service component editor is a big help to find problems, you still have to keep at least two files in sync.</description>
		<content:encoded><![CDATA[<p>Hi Kai,</p>
<p>very cool!</p>
<p>This is exactly what I&#8217;m missing in the current DS implementation. Would be nice to have the thing as ant plug-in. <img src='http://www.toedter.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Having all the information in one file (the java source file) is much simpler to manage<br />
than the current way using component.xml.</p>
<p>Although the new service component editor is a big help to find problems, you still have to keep at least two files in sync.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart McCulloch</title>
		<link>http://www.toedter.com/blog/?p=46&#038;cpage=1#comment-14937</link>
		<dc:creator>Stuart McCulloch</dc:creator>
		<pubDate>Thu, 19 Feb 2009 10:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.toedter.com/blog/?p=46#comment-14937</guid>
		<description>Interesting, perhaps you could open an RFP to standardize these annotations in OSGi, then iPOJO and other frameworks could share them. Kind of like the AOP Alliance types used in various DI frameworks.</description>
		<content:encoded><![CDATA[<p>Interesting, perhaps you could open an RFP to standardize these annotations in OSGi, then iPOJO and other frameworks could share them. Kind of like the AOP Alliance types used in various DI frameworks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
