Class JmsConnectionSession

  • All Implemented Interfaces:
    AutoCloseable, Runnable, javax.jms.Connection, javax.jms.QueueConnection, javax.jms.Session, javax.jms.TopicConnection, javax.jms.XAConnection, javax.jms.XAQueueConnection, javax.jms.XASession, javax.jms.XATopicConnection

    public class JmsConnectionSession
    extends Object
    implements javax.jms.Connection, javax.jms.XAConnection, javax.jms.Session, javax.jms.XASession, javax.jms.QueueConnection, javax.jms.XAQueueConnection, javax.jms.TopicConnection, javax.jms.XATopicConnection, AutoCloseable
    • Constructor Detail

      • JmsConnectionSession

        public JmsConnectionSession​(javax.jms.Connection connection,
                                    javax.jms.Session session)
    • Method Detail

      • getSession

        public javax.jms.Session getSession()
                                     throws javax.jms.JMSException
        Specified by:
        getSession in interface javax.jms.XASession
        Throws:
        javax.jms.JMSException
      • getXAResource

        public XAResource getXAResource()
        Specified by:
        getXAResource in interface javax.jms.XASession
      • createXASession

        public javax.jms.XASession createXASession()
                                            throws javax.jms.JMSException
        Specified by:
        createXASession in interface javax.jms.XAConnection
        Throws:
        javax.jms.JMSException
      • createBytesMessage

        public javax.jms.BytesMessage createBytesMessage()
                                                  throws javax.jms.JMSException
        Specified by:
        createBytesMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createMapMessage

        public javax.jms.MapMessage createMapMessage()
                                              throws javax.jms.JMSException
        Specified by:
        createMapMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createMessage

        public javax.jms.Message createMessage()
                                        throws javax.jms.JMSException
        Specified by:
        createMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createObjectMessage

        public javax.jms.ObjectMessage createObjectMessage()
                                                    throws javax.jms.JMSException
        Specified by:
        createObjectMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createObjectMessage

        public javax.jms.ObjectMessage createObjectMessage​(Serializable object)
                                                    throws javax.jms.JMSException
        Specified by:
        createObjectMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createStreamMessage

        public javax.jms.StreamMessage createStreamMessage()
                                                    throws javax.jms.JMSException
        Specified by:
        createStreamMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createTextMessage

        public javax.jms.TextMessage createTextMessage()
                                                throws javax.jms.JMSException
        Specified by:
        createTextMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createTextMessage

        public javax.jms.TextMessage createTextMessage​(String text)
                                                throws javax.jms.JMSException
        Specified by:
        createTextMessage in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • getTransacted

        public boolean getTransacted()
                              throws javax.jms.JMSException
        Specified by:
        getTransacted in interface javax.jms.Session
        Specified by:
        getTransacted in interface javax.jms.XASession
        Throws:
        javax.jms.JMSException
      • getAcknowledgeMode

        public int getAcknowledgeMode()
                               throws javax.jms.JMSException
        Specified by:
        getAcknowledgeMode in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • commit

        public void commit()
                    throws javax.jms.JMSException
        Specified by:
        commit in interface javax.jms.Session
        Specified by:
        commit in interface javax.jms.XASession
        Throws:
        javax.jms.JMSException
      • rollback

        public void rollback()
                      throws javax.jms.JMSException
        Specified by:
        rollback in interface javax.jms.Session
        Specified by:
        rollback in interface javax.jms.XASession
        Throws:
        javax.jms.JMSException
      • recover

        public void recover()
                     throws javax.jms.JMSException
        Specified by:
        recover in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • getMessageListener

        public javax.jms.MessageListener getMessageListener()
                                                     throws javax.jms.JMSException
        Specified by:
        getMessageListener in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • setMessageListener

        public void setMessageListener​(javax.jms.MessageListener listener)
                                throws javax.jms.JMSException
        Specified by:
        setMessageListener in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • run

        public void run()
        Specified by:
        run in interface Runnable
        Specified by:
        run in interface javax.jms.Session
      • createProducer

        public javax.jms.MessageProducer createProducer​(javax.jms.Destination destination)
                                                 throws javax.jms.JMSException
        Specified by:
        createProducer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createConsumer

        public javax.jms.MessageConsumer createConsumer​(javax.jms.Destination destination)
                                                 throws javax.jms.JMSException
        Specified by:
        createConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createConsumer

        public javax.jms.MessageConsumer createConsumer​(javax.jms.Destination destination,
                                                        String messageSelector)
                                                 throws javax.jms.JMSException
        Specified by:
        createConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createConsumer

        public javax.jms.MessageConsumer createConsumer​(javax.jms.Destination destination,
                                                        String messageSelector,
                                                        boolean noLocal)
                                                 throws javax.jms.JMSException
        Specified by:
        createConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createSharedConsumer

        public javax.jms.MessageConsumer createSharedConsumer​(javax.jms.Topic topic,
                                                              String sharedSubscriptionName)
                                                       throws javax.jms.JMSException
        Specified by:
        createSharedConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createSharedConsumer

        public javax.jms.MessageConsumer createSharedConsumer​(javax.jms.Topic topic,
                                                              String sharedSubscriptionName,
                                                              String messageSelector)
                                                       throws javax.jms.JMSException
        Specified by:
        createSharedConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createQueue

        public javax.jms.Queue createQueue​(String queueName)
                                    throws javax.jms.JMSException
        Specified by:
        createQueue in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createTopic

        public javax.jms.Topic createTopic​(String topicName)
                                    throws javax.jms.JMSException
        Specified by:
        createTopic in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createDurableSubscriber

        public javax.jms.TopicSubscriber createDurableSubscriber​(javax.jms.Topic topic,
                                                                 String name)
                                                          throws javax.jms.JMSException
        Specified by:
        createDurableSubscriber in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createDurableSubscriber

        public javax.jms.TopicSubscriber createDurableSubscriber​(javax.jms.Topic topic,
                                                                 String name,
                                                                 String messageSelector,
                                                                 boolean noLocal)
                                                          throws javax.jms.JMSException
        Specified by:
        createDurableSubscriber in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createDurableConsumer

        public javax.jms.MessageConsumer createDurableConsumer​(javax.jms.Topic topic,
                                                               String name)
                                                        throws javax.jms.JMSException
        Specified by:
        createDurableConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createDurableConsumer

        public javax.jms.MessageConsumer createDurableConsumer​(javax.jms.Topic topic,
                                                               String name,
                                                               String messageSelector,
                                                               boolean noLocal)
                                                        throws javax.jms.JMSException
        Specified by:
        createDurableConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createSharedDurableConsumer

        public javax.jms.MessageConsumer createSharedDurableConsumer​(javax.jms.Topic topic,
                                                                     String name)
                                                              throws javax.jms.JMSException
        Specified by:
        createSharedDurableConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createSharedDurableConsumer

        public javax.jms.MessageConsumer createSharedDurableConsumer​(javax.jms.Topic topic,
                                                                     String name,
                                                                     String messageSelector)
                                                              throws javax.jms.JMSException
        Specified by:
        createSharedDurableConsumer in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createBrowser

        public javax.jms.QueueBrowser createBrowser​(javax.jms.Queue queue)
                                             throws javax.jms.JMSException
        Specified by:
        createBrowser in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createBrowser

        public javax.jms.QueueBrowser createBrowser​(javax.jms.Queue queue,
                                                    String messageSelector)
                                             throws javax.jms.JMSException
        Specified by:
        createBrowser in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createTemporaryQueue

        public javax.jms.TemporaryQueue createTemporaryQueue()
                                                      throws javax.jms.JMSException
        Specified by:
        createTemporaryQueue in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createTemporaryTopic

        public javax.jms.TemporaryTopic createTemporaryTopic()
                                                      throws javax.jms.JMSException
        Specified by:
        createTemporaryTopic in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • unsubscribe

        public void unsubscribe​(String name)
                         throws javax.jms.JMSException
        Specified by:
        unsubscribe in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createSession

        public javax.jms.Session createSession​(boolean transacted,
                                               int acknowledgeMode)
                                        throws javax.jms.JMSException
        Specified by:
        createSession in interface javax.jms.Connection
        Specified by:
        createSession in interface javax.jms.XAConnection
        Throws:
        javax.jms.JMSException
      • createSession

        public javax.jms.Session createSession​(int sessionMode)
                                        throws javax.jms.JMSException
        Specified by:
        createSession in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • createSession

        public javax.jms.Session createSession()
                                        throws javax.jms.JMSException
        Specified by:
        createSession in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • getClientID

        public String getClientID()
                           throws javax.jms.JMSException
        Specified by:
        getClientID in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • setClientID

        public void setClientID​(String clientID)
                         throws javax.jms.JMSException
        Specified by:
        setClientID in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • getMetaData

        public javax.jms.ConnectionMetaData getMetaData()
                                                 throws javax.jms.JMSException
        Specified by:
        getMetaData in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • getExceptionListener

        public javax.jms.ExceptionListener getExceptionListener()
                                                         throws javax.jms.JMSException
        Specified by:
        getExceptionListener in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • setExceptionListener

        public void setExceptionListener​(javax.jms.ExceptionListener listener)
                                  throws javax.jms.JMSException
        Specified by:
        setExceptionListener in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • start

        public void start()
                   throws javax.jms.JMSException
        Specified by:
        start in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • stop

        public void stop()
                  throws javax.jms.JMSException
        Specified by:
        stop in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • close

        public void close()
                   throws javax.jms.JMSException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface javax.jms.Connection
        Specified by:
        close in interface javax.jms.Session
        Throws:
        javax.jms.JMSException
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Destination destination,
                                                                     String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Specified by:
        createConnectionConsumer in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • createSharedConnectionConsumer

        public javax.jms.ConnectionConsumer createSharedConnectionConsumer​(javax.jms.Topic topic,
                                                                           String subscriptionName,
                                                                           String messageSelector,
                                                                           javax.jms.ServerSessionPool sessionPool,
                                                                           int maxMessages)
                                                                    throws javax.jms.JMSException
        Specified by:
        createSharedConnectionConsumer in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • createDurableConnectionConsumer

        public javax.jms.ConnectionConsumer createDurableConnectionConsumer​(javax.jms.Topic topic,
                                                                            String subscriptionName,
                                                                            String messageSelector,
                                                                            javax.jms.ServerSessionPool sessionPool,
                                                                            int maxMessages)
                                                                     throws javax.jms.JMSException
        Specified by:
        createDurableConnectionConsumer in interface javax.jms.Connection
        Specified by:
        createDurableConnectionConsumer in interface javax.jms.TopicConnection
        Throws:
        javax.jms.JMSException
      • createSharedDurableConnectionConsumer

        public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer​(javax.jms.Topic topic,
                                                                                  String subscriptionName,
                                                                                  String messageSelector,
                                                                                  javax.jms.ServerSessionPool sessionPool,
                                                                                  int maxMessages)
                                                                           throws javax.jms.JMSException
        Specified by:
        createSharedDurableConnectionConsumer in interface javax.jms.Connection
        Throws:
        javax.jms.JMSException
      • createXAQueueSession

        public javax.jms.XAQueueSession createXAQueueSession()
                                                      throws javax.jms.JMSException
        Specified by:
        createXAQueueSession in interface javax.jms.XAQueueConnection
        Throws:
        javax.jms.JMSException
      • createQueueSession

        public javax.jms.QueueSession createQueueSession​(boolean transacted,
                                                         int acknowledgeMode)
                                                  throws javax.jms.JMSException
        Specified by:
        createQueueSession in interface javax.jms.QueueConnection
        Specified by:
        createQueueSession in interface javax.jms.XAQueueConnection
        Throws:
        javax.jms.JMSException
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Queue queue,
                                                                     String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Specified by:
        createConnectionConsumer in interface javax.jms.QueueConnection
        Throws:
        javax.jms.JMSException
      • createXATopicSession

        public javax.jms.XATopicSession createXATopicSession()
                                                      throws javax.jms.JMSException
        Specified by:
        createXATopicSession in interface javax.jms.XATopicConnection
        Throws:
        javax.jms.JMSException
      • createTopicSession

        public javax.jms.TopicSession createTopicSession​(boolean transacted,
                                                         int acknowledgeMode)
                                                  throws javax.jms.JMSException
        Specified by:
        createTopicSession in interface javax.jms.TopicConnection
        Specified by:
        createTopicSession in interface javax.jms.XATopicConnection
        Throws:
        javax.jms.JMSException
      • createConnectionConsumer

        public javax.jms.ConnectionConsumer createConnectionConsumer​(javax.jms.Topic topic,
                                                                     String messageSelector,
                                                                     javax.jms.ServerSessionPool sessionPool,
                                                                     int maxMessages)
                                                              throws javax.jms.JMSException
        Specified by:
        createConnectionConsumer in interface javax.jms.TopicConnection
        Throws:
        javax.jms.JMSException