Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Advanced
Sep 6, 2005

Classloader Diffculties with JBoss

When you deploy two Web applications as Web archives (WARs) into JBoss' deploy folder, you expect them to run independently of each other. But this does not happen.

WebApp1.war
  + WEB-INF
     + lib
        + abc_v1.0.jar
     + classes
        + com.abc.Class_v1.0

WebApp2.war
  + WEB-INF
     + lib
        + abc_v1.1.jar
     + classes
        + com.abc.Class_v1.1
If you deploy the two Web applications in the above structure, one of them will break. This is because JBoss/Tomcat5 classloading mechanism's class loader is used by all applications—even when they are in different WAR files.

The solution is to change the \deploy\jbossweb-tomcat50.sar\META-INF\jboss-service.xml file. If you change the UseJBossWebLoader attribute to false, a different classloader will be used for different WAR files.

Nishith Prabhakar
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap