• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

packaging log4j.properties file

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an application which wraps around log4j logger to be used by several clients. The logger is configured to send messages to a JMS topic using JMSAppender.

There are 2 portions to the application, 1 a client library which is to be used by all clients and the server portion which processes messages from JMS.

I am unable to get the clients to send messages to JMS.
The structure of my jar files are :

logging-server.jar
|
|_com
| |_test
| ||_logger.class (Class with all Static methods)
| |
| |_Server.class (MDB which processes JMS Messages)
|
|_META-INF
||_ejb-jar.xml
||_manifest.mf
|
|_WEB-INF
| |_lib
| |
| |_log4j.jar
|
|_log4j.properties
|_jndi.properties


logging-client.jar
|
|_com
| |_test
|_logger.class (Class with all Static methods)

when another ejb uses the logging-client.jar and calls the logger, its unable to send messages to the JMS.

What am I doing wrong?
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pras, welcome to JavaRanch!

JBossAS comes with Log4J embedded, and thus all log4j configuration is done via the server/xxx/conf/jboss-log4j.xml file. Essentially, your log4j configuration file is ignored.

You can work around this in one of two ways. First, you could add your logging configuration to jboss-log4j.xml. Second, you could follow these instructions from Jaikiran.
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic