On Mon, 21 Apr 2008 18:04:58 -0700
 "Himanshu Shah" <[EMAIL PROTECTED]> wrote:
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.


That's curious. I would expect log messages to be duplicates as well if configuration was performed twice?

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


Does any code in your app (or 3rd party apps) manually call configure()? Of course, that wouldn't expalin by there's not duplicate log messages.

Jake

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to