[jboss-dev-forums] [Design the new POJO MicroContainer] - OSGiControllerContext design
alesj
do-not-reply at jboss.com
Thu Mar 1 05:43:01 EST 2007
I was looking at Adrian's TBoD OSGi + MC presentation.
The idea of having new (OSGi)ControllerContext impl is what I had in mind once as well, but I didn't fully see and still don't, how this fits with integrating MC beans into OSGi layer. Ok, I have some idea when comparing this with how MBeans are integrated with MC beans, but I don't see what all we gain by having new ControllerContext.
And I don't understand what Activator has to do with it. As far as I understand BundleActivator (or this is not the same thing we are talking about) is a way to define start/stop plug-in into your bundle artifact. How is this meant as an extension to the jar format?
What was the idea behing KernelRegistryPlugin?
To sometimes simplify Controller integration with some other pojo producing layer?
So that we don't need new ControllerContext impl?
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?
My current impl (far from being finished) uses some 'hack' concepts. Mostly due to previous problem - not having an idea where / how to access BundleContext instance when deploying MC beans.
I currently used KernelRegistryPlugin approach (putting a new BundleContextHolderKRP bean into same controller + scoping him into work (bundle) scope) + adding work (bundle) scope to all MC defined beans that are meant to be exposed as OSGi services (so that they only 'see' previously defined BCHolder). Similar with services lookup - looking for KRP context in that work (bundle) scope.
Is OSGiControllerContext == BundleContext + service (bean) definition?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4024164#4024164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024164
More information about the jboss-dev-forums
mailing list