Class PooledSessionHolder


  • public final class PooledSessionHolder
    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 Detail

      • PooledSessionHolder

        public PooledSessionHolder​(PooledConnection connection,
                                   javax.jms.Session session,
                                   boolean useAnonymousProducer,
                                   int namedProducerCacheSize)
    • Method Detail

      • 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
      • isUseAnonymousProducer

        public boolean isUseAnonymousProducer()