JMS Appender in log4j.properties ??
843830Jan 11 2005 — edited Aug 4 2005Hie 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