Did you rename conf/log4j.xml to something else (like conf/jboss-log4j.xml) and update conf/jboss-service.xml to match? Also, I think log4j.jar should go in WEB-INF/lib.
Ya, i did rename the log4j.xml in conf directory to jboss-log4j.xml.
Regarding, placing the log4j.jar in WEB-INF/lib directory, i will try it out.
I have a small doubt though:
- I DONT have my class files under WEB-INF/classes in myApp.war.
- The class files are placed in a myEjb.jar and myCommon.jar
- These 2 two jars are then placed in my ear file as follows:
So, does specifying different classloader in the myApp.war, really make a difference.
If NO, how do we achieve maintaining our own log4j.properties in a J2EE application for ejbs.
Got it working. I did the following:
Placed log4j.jar and log4j.xml in myApp.ear. Then made the following entry in application.xml:
<module> <java>log4j.jar</java> </module>
Also, renamed log4j.xml to jboss-log4j.xml in conf directory of jboss, and correspondingly changed jboss-service.xml in conf directory.