-
1. Re: [JBAS-8599] Provide JNDI InitialContext as OSGi service
thomas.diesler Nov 12, 2010 3:05 PM (in response to thomas.diesler)Having said above, its one of the fundamental features of our OSGi/AS7 integration that OSGi bundles can access services that are registered using the plain MSC service API. You would not need to have a dependency on org.osgi.core let alone on org.jboss.as.osgi
All you need to do is register the MSC service with an alias
jbosgi.javax.naming.InitialContext
The OSGi API uses the FQN of the interface that the service implements. Any service that is prefixed with 'jbosgi' can be found like this using the OSGi service API. Also note, that assignability contstraints apply. So the module that provides the interface must be registered with OSGi layer and export the package or the package must be one of the Framework's system packages. The requesting bundle must be wired such that it can load see the interface.
This is descibed in more detail in: JBoss AS7 OSGi Integration
-
2. Re: [JBAS-8599] Provide JNDI InitialContext as OSGi service
thomas.diesler Nov 12, 2010 3:07 PM (in response to thomas.diesler)I did not choose to do that because the OSGi services for Tx and JNDI are in fact instances of ServiceFactory. i.e. Each requesting bundle gets its own instance.