I have .ear application deployed in websphere. It has two war, one ejb and
one rar modules. I set the -Dlog4j.configuration=path to log4j.xml file as
JVM argument. In websphere my application class loading policy is set to:

   - Classloader order: Classes loaded with application class loader
   first
   - WAR class loader policy: Single class loader for application

I have my custom layout class which extends log4j's layout. I have
implemented getHeader() method which returns information such as product
name, version, host name etc. My problem is during websphere and application
startup header gets printed twice in log files (log messages are ok, they
are not printed twice). After debugging it looks like log4j is initialized
twice during each "war" loading.

Is this possible? Or is it something else?
P.S. log4j.jar resides in my application's .ear file.

-- 
Himanshu
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Fill the brain with high thoughts, highest ideals, place them day and night
before you, and out of that will come great work.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Reply via email to