This content has been marked as final.
Show 6 replies
-
1. Re: Classloading and multiple non-isolated EARs
starksm64 Feb 21, 2006 2:49 PM (in response to lhoriman)True.
Its automatic. -
2. Re: Classloading and multiple non-isolated EARs
lhoriman Feb 21, 2006 7:16 PM (in response to lhoriman)That's great... I tried it, and the classloading worked as advertised :-)
However, it seems to break EJB injection. Both of my application EARs contain a common ejb-jar withs some basic tools (my DAO ejb and my entities). Trying to inject the DAOEJB results in this:Caused by: java.lang.RuntimeException: For EJB ReceptionistEJB could not find jn di binding based on interface only for @EJB(com.blorn.entity.dao.DAO) duplicated in entity.jar and entity.jar at org.jboss.ejb3.injection.EJBHandler.getJndiName(EJBHandler.java:216) at org.jboss.ejb3.injection.EJBHandler.loadFieldInjectors(EJBHandler.jav a:326) at org.jboss.ejb3.injection.EJBHandler.loadInjectors(EJBHandler.java:78) at org.jboss.ejb3.injection.EJBHandler.loadInjectors(EJBHandler.java:57) at org.jboss.ejb3.EJBContainer.resolveInjectors(EJBContainer.java:651) at org.jboss.ejb3.EJBContainer.initializePool(EJBContainer.java:586) at org.jboss.ejb3.EJBContainer.start(EJBContainer.java:518) at org.jboss.ejb3.SessionContainer.start(SessionContainer.java:82) at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer. java:80) ... 124 more
This makes some amount of sense because there are two JNDI entries, appA/DAOEJB/local and appB/DAOEJB/local. However, shouldn't the reference within an application's EAR be found first?
Looking at the code for Ejb3Deployment.getEjbJndiName(), it would seem that this should be the case. First the jar of the EJB requesting injection is checked, then all deployments within the EAR containing the requesting EJB, then the global Ejb3Registry. However, when I walk through with a debugger, I find that the second part is not working. The local DAOEJB is not found in the EAR search, but both DAOEJBs are found in the Ejb3Registry. I've checked and rechecked my packaging, but it looks correct.
Is this a bug?
Thanks,
Jeff Schnitzer -
3. Re: Classloading and multiple non-isolated EARs
starksm64 Feb 21, 2006 7:34 PM (in response to lhoriman)Undoubtedly. Create a bug report and if you have an example that can be made into a unit test attach that. Thanks.
http://jira.jboss.com/jira/browse/EJBTHREE -
4. Re: Classloading and multiple non-isolated EARs
lhoriman Feb 21, 2006 8:57 PM (in response to lhoriman)Done:
http://jira.jboss.com/jira/browse/EJBTHREE-454
Thanks,
Jeff -
5. Re: Classloading and multiple non-isolated EARs
fcorneli Mar 7, 2006 8:20 AM (in response to lhoriman)Hi,
I just stumbled on the same issue within the application I'm developing. When will this bug be solved? It's really a show stopper for us...
Regards,
Frank. -
6. Re: Classloading and multiple non-isolated EARs
starksm64 Mar 7, 2006 12:06 PM (in response to lhoriman)Read the issue and the fix for version roadmap.