JBoss Community

Re: [JBAS-8599] Provide JNDI InitialContext as OSGi service

created by Thomas Diesler in JBoss AS7 Development - View the full discussion

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 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 on 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 must export the interface package. The requesting bundle must import that package and have a wire to the exporter

 

This is descibed in more detail in: JBoss AS7 OSGi Integration

Reply to this message by going to Community

Start a new discussion in JBoss AS7 Development at Community