On Sep 30, 2009, at 10:47 AM, Rick McGuire wrote:
I've been looking into how to create an RFC 66 implementation that
can deploy to whatever the Geronimo-hosted web container happens to
be. One issue that seems to keep popping up is crossing the bridge
between GBeans and OSGi. A lot (ok, all really) that deal with the
server runtime and configuration are GBean instances. Some of these
GBeans will occasionally need a BundleContext to perform OSGi
operations. It would appear that we'd need to have an mechanism to
allow a GBean to be injected with a Bundle and/or BundleContext for
its hosting configuration.
That's implemented and appears to be working in my osgi sandbox. One
of the tasks I envision once the g. framework actually boots up inside
karaf is converting all the gbeans that use the magic classloader
attribute to use bundle context instead.
Currently I'm fighting with a classcast exception deep in plexus that
I managed to avoid a couple weeks ago but its popped up again. There
are a lot of jars that need to be bundleized and a bunch of problems
in the servicemix bundleizations.... I may be making some progress
however.
thanks
david jencks
Rick
David Jencks wrote:
On Sep 22, 2009, at 10:50 PM, Ivan wrote:
After reading some code changes of the geronimo-kenel in the
sanbox, I found that we keep the Geronimo kenel as an OSGI
service, and each Configuration ( or a bundle) will search it and
start the configuration as we do in the past while starting.
There's a difference in lifecycles between osgi bundles and
geronimo configurations.
OSGI:
bundles can be installed, in which case the classes are not
available, or started, in which case the classes are all available
and the bundle activator has been started. AFAICT there is no
other built in "no-really-start-it" state beyond "started". There
might be more less-started states I'm not aware of.
Geronimo:
A Configuration is a gbean. You can't get much usefaul data out of
it until its started. Once it is started the classes are available
and you can find out what services (gbeans) are in the
configuration and look at their attributes. There's a further
state of "all gbeans started". The configuration manager treats
these states as "loaded" and "started"
So far it seems to work to do something similar in the osgi
environment but it doesn't really fit very well yet. I'm not sure
where we will end up with this.
I have a feeling that, if we do that, Geronimo is still a part of
OSGI env, could we make the Geronimo is an OSGI env?
I don't understand what you are asking here. In the sandbox,
geronimo plugins are running in an osgi enviroment, and all the
classes are loaded from osgi bundles. Could you explain more what
you are asking about?
Could we publish GBeans as OSGI service via a
ConfigurationActivator, or though a GBean-OSGI adapter ?
I'm pretty sure we could, but I'd like to get more stuff working
before we decide if its a good idea. IIUC blueprint doesn't
publish every blueprint bean as an osgi service, but only ones you
configure to be published. I suspect we may want to, similarly,
only publish some gbeans as osgi services.
My current approach is to try to modify the existing geronimo
architecture relatively little where possible to get it to run in
osgi, respecting osgi architecture. So, I am trying to get stuff
working with the kernel as an osgi service, get the deployers
working, etc etc. I think after we have done this we will have a
much better idea what other work we want to try. For instance, we
might not need a kernel at all: possibly gbeans can just be osgi
services with a few extra attributes.
thanks
david jencks
Thanks !
2009/9/22 Rex Wang <rwo...@gmail.com <mailto:rwo...@gmail.com>>
Yes! hope for detail sharing :-)
-Rex
2009/9/22 Jack Cai <greensi...@gmail.com
<mailto:greensi...@gmail.com>>
David, that's exciting work!
It'll be great if you can share some more details. There are
a few puzzles that flow around my mind -
* Are we just taking OSGi framework in as another plug-in to
let it host OSGi applications? Or, vice-versa, we are
converting Geronimo into an OSGi application?
* If the latter case, will GBean go away?
* If yes, how much code changes are required? I'd say a
lot ...
-Jack
On Tue, Sep 22, 2009 at 8:25 AM, David Jencks
<david_jen...@yahoo.com <mailto:david_jen...@yahoo.com>>
wrote:
Over the weekend I got my sandbox osgi framework to build
and generate all the plugins as osgi bundles. This
involves running some of the geronimo server on
osgi/felix inside maven. The dependency management
system seems to work OK at least for starting bundles. I
also started doing a little bit of code cleanup.
I think the next step will be to get the framework server
running in standalone karaf or felix. Hopefully this
will be no harder than getting it running in embedded
felix in maven.
thanks
david jencks
--
Ivan