Understanding Classloaders: log4j in a J2EE Environment
Subject:   At first sight I agree, but.......
Date:   2003-04-11 05:30:55
From:   gvix
Response to: At first sight I agree, but.......


Thanks for the feedback.

You are correct. When you deploy it as an ear file, you lose the ability to change it at runtime. Having said that, you can still configure it at runtime by providing a runtime interface to the log4j API. Remember, log4j can be reconfigured using direct calls to the API. I have myself not tried this, but I believe it can be done. I am also not sure if you can do the same with the exploded format. I would love to hear from somebody who has tried this.

As regards your second issue, if you application has a web part, you can use a startup servlet. If not, you can use a static class that does the initialization for you.

Hope this helps,
Vikram Goyal

1 to 1 of 1
1 to 1 of 1