Saturday, June 23

Guice-OSGi 0.1.0 released

FYI, I've just made an initial drop of my Guice-OSGi laboratory project:

http://wiki.ops4j.org/confluence/display/ops4j/Guice-OSGi

org.ops4j.guice-osgi.core-0.1.0.jar
org.ops4j.guice-osgi.core-0.1.0-javadoc.jar
org.ops4j.guice-osgi.core-0.1.0-sources.jar

which lets you use Guice to access / register OSGi services - for example:

@Inject
@OSGiServiceRegistration
ExampleService exported;

would register the object injected into 'exported' as an OSGi service, and:

@Inject
@OSGiService
ExampleService imported;

would inject a proxy into 'imported' which delegates to the OSGi service.

example (use 'mvn clean install pax:provision' to try it out)

It's capable of lots more (custom LDAP filters, injected listeners, etc.) but I have a flight to catch in a few hours and need to finish my packing :) The integration tests checked into subversion contain more examples.

It doesn't do everything Spring-OSGi does, but then again it is only one bundle of ~500k ;)

(PS. I've also released 0.1.6 of the Pax Construct tools - busy week!)

No comments: