Finally where to place log4j.jar and the properties file?


General J2EE: Finally where to place log4j.jar and the properties file?

  1. I see so much about classloaders...i dont care.
    I have an ejb.jar and webfile.war inside my .ear.
    I am trying to place my log4j.version.jar file in the root
    of the .ear file along with the webfile.war and ejb.jar. but where do i place my file in the .ear?..and how do i configure the log4j so that both the
    web and ejb applications use it?

    pls tell me....dont tell me to place it in the system ..i need it in the application(.ear) without duplicating it.

    thanks a lot!
  2. From what I remember, the EJB Classloader includes the root of the EAR. So you should be able to put the properties alongside the log4j.jar.

    Let me know if that works.
  3. unfortunately no![ Go to top ]

    it seems that the EJBClassloader doesnt seem to include it...
    What i did finally was...have another props.jar along side log4j.version.jar,ejb.jar and web.jar and also added the value props.jar in the Class-Path entry of the ejb.jar manifest file. The props.jar contains the It seems to work.
    I dont know if this is the best way...or can u suggest something else?