My apologies.  I seem to be having trouble conveying the problem.  This might 
be detailed and long, but let me try again:

A) The WAR approach you mention works fine to separate "just" the logging from 
jBoss.  I have tested in 3.2.3, 3.2.6, 4.0.0 (finally succeeded in download) 
and 4.0.1.

B) The second part of the problem is to separate code (any code) between one 
WAR and another.  This is necessary for "write once deploy anywhere".  The 
following are the scenarios I followed:

B1) Although I expected a conflict, I created 2 WARs as per (A), both 
containing a servlet "TestServlet.java" that displayed "Hello 1" or "Hello 2" 
on the console when deployed, depending of which WAR.  As expected both 
displayed the string from the WAR that was deployed first.

B2) Found some instructions in the jBoss site to accomplish (A) using EARs.  
The instructions were virtually identical, except for requiring 
META-INF/jboss-app.xml instead of jboss-web.xml and also needing 
META-INF/application.xml.

B3) Deployed it on 3.2.6 and got log4j exceptions.  Stripped it down to the 
point that there isn't even log4j code in the EARs, just the presence of 
log4j.jar (of a different version than jBoss) in the WEB-INF/lib.  It seems 
that jBoss commons-logging.jar is trying to call the WAR's log4j.jar.

B4) Tested on other jBoss versions.  3.2.3 works fine.  4.0.0 works fine.  
4.0.1 does not work, even after following the release notes to make it 
compatible with J2EE 1.4 as 4.0.0 was.

B5) Reported problem as bug JBAS-1551.  The two EARs and TestServlet.java are 
attached there.

Ultimately, the goal is to build EARs that are "build once, deploy anywhere" 
for any jBoss version (in its default "as downloaded" configuration) as well as 
servers from other vendors, and have no log4j problems nor conflicts with any 
classes in other EARs that might have the same package/class names.  

I hope this long description helps understand the problem, and that a solution 
can be found.

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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to