users@glassfish.java.net

How to configure the same java class with different EJB names

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Aug 2009 15:43:05 PDT

Hi all,

according to the EJB spec it should be possible to configure differently named EJBs (here MDBs) based on the same java class. For every EJB name, I could choose a different configuration, ie inject different resources.

But this does not work for us. Only the first configuration is picked up for _all_ names.
See this issue:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=8614

The same seems to apply to session beans:

https://glassfish.dev.java.net/issues/show_bug.cgi?id=6653

So the only workaround we found is to generate differently named wrapper classes for every EJB name. And if we need to configure extra EJBs dynamically at deployment time, we have to use pre-manufactured wrapper classes numbered as "MdbWrapper01, MdbWrapper02, ...".

Is that actually J2EE spec compliant or do we something wrong here?

Many thanks, Jörg
[Message sent by forum member 'jthoennes' (jthoennes)]

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