[jboss-user] [JNDI/Naming/Network] - Re: ClassCastException after redeploy

jaikiran do-not-reply at jboss.com
Thu Oct 12 08:37:54 EDT 2006


So you want to have a separate war containing the remote/home interfaces and also an ear containing these remote/home interfaces. You want these 2 to behave as two separate applications independent of each other. You will have to do classloader isolation as mentioned in
Section "Isolation" at:

http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

Briefly, you will have to add the following entry to your jboss-web.xml(present in your war file) :

<jboss-web>
  |  <class-loading java2ClassLoadingCompliance="false">
  |  <loader-repository>
  |  someName.someOtherName:loader=someUniqueName
  |  <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
  |  </loader-repository>
  |  </class-loading>
  | .....
  | </jboss-web>

And add the following to jboss-app.xml(present in ear file):


  | <jboss-app>
  |   <loader-repository> 
  |   someName2.someOtherName2:loader=someOtherUniqueName 
  |      <loader-repository-config> 
  |      java2ParentDelegation=false 
  |      </loader-repository-config> 
  |   </loader-repository>
  | </jboss-app>

This will actually create 2 separate classloaders, one for the ear application and the other for the war application. You can then use the war separately from the ear file. 



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977865#3977865

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977865



More information about the jboss-user mailing list