[jboss-dev-forums] [Design of OSGi Integration] - Re: OSGiControllerContext design

adrian@jboss.org do-not-reply at jboss.com
Mon Mar 5 08:48:49 EST 2007


"alesj" wrote : 
  | In order to register OSGi service, one must have current bundle's BundleContext.
  | This changes the concept that we are currently used to - (mostly) one mbean server, main bootstrap kernel - multiple contexts with multiple (m)beans pluged via 'central' state machine.
  | Here we have multiple beans / services coresponding to certain bundle context. Where to keep this bundle context information in order to be accessable by MC beans marked as an OSGi exposed / lookup services?
  | 

The BundleContext should come from the deployment, it is an object that lives
outside the core microcontainer like the KernelDeployment aggregation.
It should be held on the OSGiControllerContext and passed to the OSGi
api facade in which the OSGi service lives.

If you want to integrate other contexts that are not native OSGi (like POJOs mbeans), 
this will need an "on the fly" implementation of the bundle context or whatever OSGi
expects.
I can't remember the exact details, since it is a while since I looked at the OSGi api.
I do remember there are some notifications required in there somewhere.

For an example of a simple facade., see the ServiceControllerContext 
which pretends to provide a legacy ServiceController,
which is now just a wrapper to the MC.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025047#4025047

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025047



More information about the jboss-dev-forums mailing list