开发者

OSGi bind object to JNDI in Glassfish

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, 开发者_Go百科is there some other way to access this object that is bound in the BundleContext from within my web application?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜