views:

14

answers:

1

New to OSGi and Glassfish. I have an OSGi bundle written that creates a non-serializable manager object that I would like to expose via JNDI so that my web applications can utilize it. (Previously with JBoss I utilized org.jboss.naming.NonSerializableFactory to do this, but I can't seem to find any analogous approach with Glassfish.)

Assuming this can't be done with GF, is there some other way to access this object that is bound in the BundleContext from within my web application?

A: 

You can deploy your web application as a bundle and there by access the "non-serializable manager object" as an OSGi service. You can either change the web app to make a bundle or you can convert it into a bundle on the fly using the following commands: start glassfish telnet localhost 6666

install webbundle:file:/tmp/foo.war?Web-ContextPath=/foo start

I don't watch this forum, I watch glassfish forum - you can ask there if you wish.

Sahoo