Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JMS Appender in log4j.properties ??

843830Jan 11 2005 — edited Aug 4 2005
Hie Experts,

I have setup a logging mechanism to log messages asynchronously using JMS queue.

Currently, I am doing this as a call to a method.

Inside the method, I am
- creating a JNDI context,
- retrieve queue connection factory,
- create a queue session, create a queue sender and
- associate to the retrieved queue.
- Finally I send the message and close the queue.

I do not think that this is the best strategy because:
1. Queue gets initialized for all logging (making it slower)
2. I believe that there must be a simpler way such as adding a JMS appender in log4j.properties

Please advise if there is a better strategy.

Thanks,

V Chitkara
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2005
Added on Jan 11 2005
2 comments
299 views