• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

log4j.properties in ear file

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a ear file which contains only and ejb-jar file and no war modules.

I have configured log4j in the following way.
Add the log4j.properties,commons-logging.properties to the base directory of the ejb.jar.
In the manifest.mf of the ejb-jar,i added the commons-logging.jar and log4j.jar as entries in the classpath.then placed the jars in the base directory of the ear.
Now this works fine.

However,I dont want the log4j.properties embedded in the ejb-jar file as this makes it difficult for the admins to change/edit.

i want the log4j.properties in the base directory of the .ear file.
I tried placing the properties file in the base directory and adding a entry as log4j.properties in the manifest.mf of the ejb-jar .but still doesnt work.

I am using IBM websphere 5.1 app server.

Need info how to enable log4j in the above scenario.
will be thnkful to anyone who can shed some light on this topic.

Thanks in advance,
Naveen Nagarajan

p.s:Moderator , i am adding this topic in IBM Websphere too.
Not sure where to post. If required,please delete this post from one of
the places.Sorry for the duplicates.
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Putting the log4j-jar-file inside the ejb.jar
is the wrong way doing this!

You have to place your log4j-jar-file in the root directory
of your ear-file where your property-file also resides.

Than you need a reference in your ejb-jar-file's manifest-file on the
log4j-file.

I'm actually doing it the way I described above and it is working fine.

Alierza
 
N Naveen
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can you give a sample of how your manifest.mf looks like ?
Thanks,
Naveen N
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic