users@glassfish.java.net

Re: EJBs in OSGi Bundles

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 Jun 2010 03:17:14 PDT

Hi Sahoo,

First of all thank you for the various blog entries describing the yet experimental art of EJB deployment by means of OSGi ! Thanks to those I was able to set it all in motion.

I'm having a problem who's solution eludes me: I'm using session beans I need to publish as OSGi services. Luckily I found your article (http://www.java.net/print/242458). I'm having a problem though: The activator (reference 2b in your article) kicks in [b]before[/b] the EJB is deployed. While this construction can only work in the inverse scenario of course.

I've tried various settings at no prevail. A logical solution seemed to me to add the dependency of my service bundle with the bundle "org.glassfish.osgiejb"; to force it load that bundle before. And hoping it would deploy the EJB too. Waiting for the EJB deployment in background doesn't work either because it seems to be waiting for the activator to complete. Once it completes you see the logging appear of the EJB being deployed.

I've installed the bundle "osgi-ejb-container-3.1-SNAPSHOT.jar" btw.

I'm rather stuck here. I'm rather new to OSGi, so I don't know what else to try. I used the nightly builds of yesterday for both GF and the OSGi EJB container.

Do you know by any chance how I can reverse the order of deployment ? First deploy the EJB and AFTER that having the bundle activator start ?

Regards & thanks,

Jan
[Message sent by forum member 'jan_goyvaerts']

http://forums.java.net/jive/thread.jspa?messageID=473287