Package org.apache.activemq.jms.pool
Class SessionHolder
- java.lang.Object
-
- org.apache.activemq.jms.pool.SessionHolder
-
public class SessionHolder extends Object
Used to store a pooled session instance and any resources that can be left open and carried along with the pooled instance such as the anonymous producer used for all MessageProducer instances created from this pooled session when enabled.
-
-
Constructor Summary
Constructors Constructor Description SessionHolder(Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
MessageProducer
getOrCreateProducer()
TopicPublisher
getOrCreatePublisher()
QueueSender
getOrCreateSender()
Session
getSession()
String
toString()
-
-
-
Constructor Detail
-
SessionHolder
public SessionHolder(Session session)
-
-
Method Detail
-
close
public void close() throws JMSException
- Throws:
JMSException
-
getSession
public Session getSession()
-
getOrCreateProducer
public MessageProducer getOrCreateProducer() throws JMSException
- Throws:
JMSException
-
getOrCreatePublisher
public TopicPublisher getOrCreatePublisher() throws JMSException
- Throws:
JMSException
-
getOrCreateSender
public QueueSender getOrCreateSender() throws JMSException
- Throws:
JMSException
-
-