• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

intializing log4j in a .ear file

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a log4j.jar, .war and ejb.jar file inside the .ear file.

How can the ejb use the logging feature ??(Both the war and ear are in same JVM)
How can the ejb access this log4j.properties ?

Please Help
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your app server usually has a log4j somewhere (vendor specific). So you don't need to include that into you ejb.jar or ear files.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
LOG4j setup for a .ear format:

The EJB .jar file has no knowledge about the log4j classes in the WEB-INF directory of the corresponding webapp, as the EJB and webapp use different classloaders.

1.Place the log4j.jar file in the root path.

and this worked.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!