aitor moragas [http://community.jboss.org/people/tryasta] created the discussion

"Class Loading issues in JBoss 5.1.0"

To view the discussion, visit: http://community.jboss.org/message/633249#633249

--------------------------------------------------------------
Hi,

I've checked other class loading issues threads in this forum, but no provided 
solution has worked for me so far. Therefore, I shall post here my problem to 
check that I am doing things rightly.

I have a jboss instance, which is currently shared by numerous applications. I 
mean, various applications are deployed there, most of which we cannot touch or 
control.

Our application is an EAR which includes two modules: an EJB and a WAR.

app.ear
 |
 |\
 |  myEjb.jar
 \
  myWar.war

myEjb.jar uses a class let's call it myClass.class (inside app.ear/lib) whose 
name is shared by other applications running in this JBoss instance. Therefore, 
I thought that a classloading file like

<classloading xmlns="urn:jboss:classloading:1.0"
          name="app.ear"
          domain="app.ear:loader=app.ear"
          parent-domain="DefaultDomain"
          export-all="NON_EMPTY"
          import-all="true"
          parent-first="false"/>

would be enough to make sure the classes that both the EJB and the WAR use are 
the ones inside app.ear.

I also added two class loading files for the EJB and the WAR. They are like 
these:

<classloading xmlns="urn:jboss:classloading:1.0"
          name="myEjb.ejb"
          domain="myEjb.ejb"
          parent-domain="app.ear:loader=app.ear"
          export-all="NON_EMPTY"
          import-all="true"
          parent-first="false"/>

<classloading xmlns="urn:jboss:classloading:1.0"
          name="myWar.war"
          domain="myWar.war"
          parent-domain="app.ear:loader=app.ear"
          export-all="NON_EMPTY"
          import-all="true"
          parent-first="false"/>

But this configuration is not guaranteeing that the actual myClass that the EJB 
is loading is the one inside the app.ear/lib directory.

I don't want to set the parent-domain to "ignored" since there are lots of 
libraries in the common/lib directory that my application needs (spring, 
hibernate...)

Is there something I should do differently? 

Thx
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/633249#633249]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to