users@glassfish.java.net

Re: _at_Remote EJB + JNDI supported in hybrid (JavaEE+OSGi) JAR?

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Fri, 28 May 2010 08:21:56 +0530

Hi,

I just downloaded your OSGi EJB bundle called
org.nightlabs.test.osgi.ejb_1.0.0.jar and tested. It works and does not
work depending on how you deploy it.

Option #1:
If I deploy by copying org.nightlabs.test.osgi.ejb_1.0.0.jar to
domain1/autodeploy/bundles/, it works. I can see the remote EJBs getting
bound to JNDI. Can you please deploy like this for the moment?

Option #2:
If I deploy using asadmin command "asadmin deploy --type=osgi
org.nightlabs.test.osgi.ejb_1.0.0.jar," I don't see the EJBs getting
deployed. I see message like this in server.log:

Exception deploying bundle
reference:file:/space/ss141213/WS/gf/v3/publish/glassfishv3/glassfish/domains/domain1/applications/org.nightlabs.test.osgi.ejb_1.0.0/

You probably didn't notice this message in the log. The command returns
successfully. This is a bug, because the message should have propagated
back to asadmin client as a warning. Secondly, I know why the error is
happening. The jar name is same as bundle-symbolicname+"_" +
bundle-version and that's causing a conflict. Again this is not an
application issue. I expect this to be handled by the code. To work
around this problem, simply rename the jar to something else. I have
tried this and it works as well.

I have filed issue 12078 to address these issues, but that should not
stop you from proceeding as there are simple work arounds available as
described above.

Thanks,
Sahoo

glassfish_at_javadesktop.org wrote:
> I just found a mistake: The classes were refactored many times and the previous version of the EJB didn't implement the remote interface. No wonder that this doesn't work! I'm sorry, I should have checked whether the classes were still the way I thought them to be.
>
> Anyway, even after I fixed this, the EJB still doesn't occur in JNDI.
>
> Here are the sources + binaries: http://nightlabs.de/~marco/glassfish/2010-05-27.02/
> [Message sent by forum member 'nlmarco']
>
> http://forums.java.net/jive/thread.jspa?messageID=471760
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>