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.