From: <fxj...@ya...> - 2004-01-26 19:21:44
|
Hi all, I'm trying to get one application inside an .ear to use beans inside another .ear. On both ear's I'm using custom class loader through the <loader-repository> tag in jboss-app.xml. On both ears, in their application.xml I expose a jar containing the ejb interfaces using the <module> tag. The problem is that when I try to call a getHome in one ear, it throws classcastexception when trying to call narrow method in PortableRemoteObject class. Am I doing something wrong? I'm sure the classcastexception is generated because of the different class loaders. I read the JBOSS admin guide in the section about classloaders and indeed I did a modification in the code which calls the narrow method and I could check they are from different classloaders. what I get from calling narrow is this: org.jboss.mx.loading.UnifiedClassLoader3@e85a35{ url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43175corporativo.ear ,addedOrder=45} what I get from the ear calling the get home is this: org.jboss.mx.loading.UnifiedClassLoader3@185c59c{ url=file:/opt/jboss-3.2.3/server/default/tmp/deploy/tmp43176temis.ear ,addedOrder=46} I can see that the class loaders are in fact different. But from my two disparate ears! I mean, I thought if I used custom classloaders, it would not be visible by other applications in other classloaders. Am I missing something? What can I do to solve that? Please, help me. I'm desperate! :) Thanks in advance. Regards, Francisco Figueiredo Jr. ===== Regards, Francisco Figueiredo Jr. --- "My grandfather once told me that there are two kinds of people: those who work and those who take the credit. He told me to try to be in the first group; there was less competition there." - Indira Gandhi ______________________________________________________________________ Yahoo! GeoCities: a maneira mais fácil de criar seu web site grátis! http://br.geocities.yahoo.com/ |