Package org.messaginghub.pooled.jms.pool
Class PooledSessionHolder
java.lang.Object
org.messaginghub.pooled.jms.pool.PooledSessionHolder
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
ConstructorsConstructorDescriptionPooledSessionHolder(PooledConnection connection, javax.jms.Session session, boolean useAnonymousProducer, int namedProducerCacheSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()getOrCreateProducer(JmsPoolSession jmsPoolSession, javax.jms.Destination destination) getOrCreatePublisher(JmsPoolSession jmsPoolSession, javax.jms.Topic topic) getOrCreateSender(JmsPoolSession jmsPoolSession, javax.jms.Queue queue) javax.jms.SessionbooleanvoidonJmsPoolProducerClosed(JmsPoolMessageProducer producer, boolean force) toString()
-
Constructor Details
-
PooledSessionHolder
public PooledSessionHolder(PooledConnection connection, javax.jms.Session session, boolean useAnonymousProducer, int namedProducerCacheSize)
-
-
Method Details
-
close
public void close() throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
getSession
public javax.jms.Session getSession() -
onJmsPoolProducerClosed
public void onJmsPoolProducerClosed(JmsPoolMessageProducer producer, boolean force) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
getOrCreateProducer
public JmsPoolMessageProducer getOrCreateProducer(JmsPoolSession jmsPoolSession, javax.jms.Destination destination) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
getOrCreatePublisher
public JmsPoolTopicPublisher getOrCreatePublisher(JmsPoolSession jmsPoolSession, javax.jms.Topic topic) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
getOrCreateSender
public JmsPoolQueueSender getOrCreateSender(JmsPoolSession jmsPoolSession, javax.jms.Queue queue) throws javax.jms.JMSException - Throws:
javax.jms.JMSException
-
getConnection
-
isUseAnonymousProducer
public boolean isUseAnonymousProducer() -
toString
-