Title: log4j with JMS

Hi,
I've written a JMSQueueAppender that basically writes to a JMS queue (very similar to the existing JMSAppender which writes to a JMS Topic).  My question is :  Each time a log request comes through, will new connection, session, and sender objects be created each time ?  I implemented my JMSQueueAppender in almost the identical way to the current JMSAppender.  I'm also using log4j with only 1 Category instance (the root).  I'm just a little unclear about when activateOptions() is actually called. 

Case 1: If it's called each time a log request is made, then I'm guessing that new connection, session, and sender objects will be created per log request. 

Case 2: But if activateOptions() is only called once, then I'm guessing that this JMSQueueAppender instance is used repeatly to serve all log requests, which case only 1 connection, session, and sender object is created.  In this case, since I'm only using one Category instance, do I have to worry about synchronization, or session pooling ?

Thanks,

Jamie

Reply via email to