0 Replies Latest reply on Apr 28, 2008 11:06 AM by smpub2000

    Log4j repository selector solution for EAR files

    smpub2000

      To solve the issue of having your own log4j.properties, the article at http://wiki.jboss.org/wiki/Log4jRepositorySelector says: "While you can solve this problem using class loader scoping, the preferred way to do this is using a RepositorySelector ". However the article in the url above does not specify how it can be (non-intrusively) adapted for an EAR:
      Quote from same article:
      "Now in you EJB, in your constructor, do this:
      ContextRepositorySelector.init(this);
      trcLog = Logger.getLogger("MyLogger");
      "

      The EAR file for which I want to use log4j.properties has many EJBs and WAR.
      Any ideas on how it can be adapted for an EAR without having to create the context in every EJB constructor and Servlet init method?
      Any other thoughts?