-
1. Re: JBoss3.0.0+Tomcat4.0.3 ClassLoader intermingling between
juha Sep 10, 2002 2:10 PM (in response to chansen)You can override this sharing behavior with jboss-app.xml. See this FAQ for more details: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/
-
2. Re: JBoss3.0.0+Tomcat4.0.3 ClassLoader intermingling between
chansen Sep 17, 2002 12:12 PM (in response to chansen)Juha -
Thanks for the info. We were able to use the jboss-app.xml deployment descriptor to separate the Unified Repository as it described.
Having the apps separate yields another problem, though. App A makes EJB calls to App B. We add App B's EJB interfaces and homes to ear A. In a web app in app A, a lookup of the home succeeds but the narrow throws a CastClassException. Note that we have not hot deployed, so this is not the same problems as described in thread
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ Proxy returned by the lookup is from App B's UnifiedClassLoader. It appears that, despite the separation of app Unified Repositories, JBoss has one shared JNDI namespace with Proxy classes loaded from different Repositories. I would have expected/hoped that JBoss would create and bind a seperate Proxy for App A so that App A could look up an EJBHome in another app and the cast would succeed.
So, for apps that use different class Repositories (i.e. configured to be compliant with the J2EE), what is the best way to call an EJB between apps? We tried adding a jndi-name entry with a jnp URI to the jboss-web.xml, but that had no effect.
Do we have to configure jndi.properties to always use JNP? That would have the undesirable side-effect of forcing even intra-app EJB calls to go through the JNP server.
Thanks in advance.
- Chris Hansen -
3. Re: JBoss3.0.0+Tomcat4.0.3 ClassLoader intermingling between
juha Sep 17, 2002 1:38 PM (in response to chansen)Does the lookup fail if you don't use PRO.narrow() on the home proxy?
-
4. Re: JBoss3.0.0+Tomcat4.0.3 ClassLoader intermingling between
chansen Sep 19, 2002 11:38 AM (in response to chansen)The lookup is before the narrow. The lookup succeeds regardless. It's the narrow that fails. We tried replacing the narrow with a simple cast but that also fails with a ClassCastException.
We worked around the problem by combining the two applications into one ear. But I don't think that that workaround is always acceptable, so we're still curious if there's a way to communicate between apps with different repositories on the same server.