Hi Henry org.apache.felix.scr.annotations-1.3.0.jar is a 20K dependency needed only at compile-time and using real annotations has many advantages compared with the doclet variant:
- you can use class-reference rather than having to type fully qualifies classnames - ide support - many errors are detected earlier In the clerezza code we're generally moving from doclet annotations to using java annotations. Cheers, reto On Tue, Jul 27, 2010 at 6:57 PM, Henry Story <[email protected]> wrote: > Hi Bertrand, > > Thanks for the link to the documentation. I looked more carefully into the > OSGi components, and rewrote the keygen module to use the OSGi javadoc > annotation method. That means that there is no source code dependency in > > http://github.com/bblfish/keygenapp > > on anything in clerezza or felix, though there is now an mvn dependency on > the felix maven-scr-plugin. But that is ok. It is also quite easy to use. I > was trying to be a bit too minimalistic before. > > So this now works with the clerezza patch. But the patch still needs a > bit of work to look nice and work correctly... So things are progressing. > Will let you all know when we have something stable. > > One thing I will need to do is publish the keygenapp on the mvn repository > for this to be integrated more deeply into clerezza. I'll look into that > too. > > Henry > > On 27 Jul 2010, at 11:48, Bertrand Delacretaz wrote: > > > Hi, > > > > On Tue, Jul 27, 2010 at 10:25 AM, Henry Story <[email protected]> > wrote: > >> > >> On 26 Jul 2010, at 18:43, Bertrand Delacretaz wrote: > >>> ... See [1], the activate method needs to have one argument, but 3 > >>> argument types variants are accepted. > >> > >> ...I just tried using the method with signature > >> > >> protected void activate(Map properties) > >> > >> in the KeygenService implementation at > http://github.com/bblfish/keygenapp > >> but Clerezza no longer calls it. It does get called when I have the > ComponentContext argument... > > > > This should work according to the OSGi compendium spec 4.2, 112.5.8, > > "Activate Method". > > > > I'm not too familiar with the Felix code that handles this but it > > looks like it's [2] which is getting the activate method, and that > > should support a single Map parameter in activate(), but only if the > > component is using the Declarative Services spec version 1.1. > > > > According to [3] the maven-scr-plugin detects if your component is > > using features from the spec version 1.1, maybe you need to force that > > using the specVersion plugin config. > > > > A buggy version of the Felix SCR bundle might also cause the problem, > > according to http://felix.apache.org/site/downloads.cgi the current > > version is 1.4.0. > > > > HTH, and I'm interested in finding out why that doesn't work! > > -Bertrand > > > > [2] > http://svn.apache.org/repos/asf/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/helper/ActivateMethod.java > > > > [3] http://felix.apache.org/site/apache-felix-maven-scr-plugin.html > >
