users@glassfish.java.net

Re: Question about webapps connecting to OSGI Services

From: <forums_at_java.net>
Date: Fri, 10 Jun 2011 13:07:17 -0500 (CDT)

I haven't tried this myself, but at least I can give you some pointers:

AFAIK, *Embedded* Glassfish does not (fully) support OSGi, see this thread
[1] for a discussion.

Is your web app deployed as a plain old WAR or as an OSGi bundle? If it's a
WAR, it won't be treated as a bundle, so the activator won't help, I assume.
In this case, CDI injection with the @OSGiService extension [2] should do
the trick. If it's a bundle, then of course you can use a bundle activator or
Declarative Services as usual.

The latest and most complete documentation of OSGi features in Glassfish has
just been published [3] in a document by Sanjeeb Sahoo.

Hope that helps,

Harald

 

 

 


[1]
http://www.java.net/forum/topic/glassfish/glassfish/glassfish-31-embedded-osgi
[2] http://blogs.oracle.com/arungupta/entry/totd_154_dynamic_osgi_services
[3]
http://blogs.oracle.com/theaquarium/entry/osgi_glassfish_the_definitive_guide

--
[Message sent by forum member 'hwellmann']
View Post: http://forums.java.net/node/811646