Class OutboundSession

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected OutboundConnection cnx
      The OutboundConnection the session belongs to.
      private static boolean DEBUG  
      private static Logger logger  
      (package private) jakarta.jms.Session sess
      The wrapped JMS session.
      (package private) boolean started
      true if the session is started.
      protected boolean transacted  
      (package private) boolean valid
      true if this "handle" is valid.
      • Fields inherited from interface jakarta.jms.Session

        AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void checkValidity()
      Checks the validity of the session.
      void close()
      In Java EE, closing of the session occurs while closing the component's connection.
      void commit()
      Forbidden call on a component's outbound session, throws a IllegalStateException instance.
      jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue, String selector)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.BytesMessage createBytesMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest, String selector)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest, String selector, boolean noLocal)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createDurableConsumer​(jakarta.jms.Topic topic, String name)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createDurableConsumer​(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TopicSubscriber createDurableSubscriber​(jakarta.jms.Topic topic, String name)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TopicSubscriber createDurableSubscriber​(jakarta.jms.Topic topic, String name, String selector, boolean noLocal)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MapMessage createMapMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.Message createMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.ObjectMessage createObjectMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.ObjectMessage createObjectMessage​(Serializable obj)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageProducer createProducer​(jakarta.jms.Destination dest)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.Queue createQueue​(String queueName)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createSharedConsumer​(jakarta.jms.Topic topic, String sharedSubscriptionName)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createSharedConsumer​(jakarta.jms.Topic topic, String sharedSubscriptionName, String messageSelector)  
      jakarta.jms.MessageConsumer createSharedDurableConsumer​(jakarta.jms.Topic topic, String name)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageConsumer createSharedDurableConsumer​(jakarta.jms.Topic topic, String name, String messageSelector)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.StreamMessage createStreamMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TemporaryQueue createTemporaryQueue()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TemporaryTopic createTemporaryTopic()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TextMessage createTextMessage()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.TextMessage createTextMessage​(String text)
      Delegates the call to the wrapped JMS session.
      jakarta.jms.Topic createTopic​(String topicName)
      Delegates the call to the wrapped JMS session.
      int getAcknowledgeMode()
      Delegates the call to the wrapped JMS session.
      jakarta.jms.MessageListener getMessageListener()
      Forbidden call on a component's outbound session, throws a IllegalStateException instance.
      boolean getTransacted()
      Delegates the call to the wrapped JMS session.
      boolean isStarted()
      return started value.
      void recover()
      Delegates the call to the wrapped JMS session.
      void rollback()
      Forbidden call on a component's outbound session, throws a IllegalStateException instance.
      void run()
      Method never used by a component, does nothing.
      void setMessageListener​(jakarta.jms.MessageListener messageListener)
      Forbidden call on a component's outbound session, throws a IllegalStateException instance.
      (package private) void start()
      set started = true
      String toString()  
      void unsubscribe​(String name)
      Delegates the call to the wrapped JMS session.
    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • sess

        jakarta.jms.Session sess
        The wrapped JMS session.
      • valid

        boolean valid
        true if this "handle" is valid.
      • started

        boolean started
        true if the session is started.
      • transacted

        protected boolean transacted
    • Constructor Detail

      • OutboundSession

        OutboundSession​(jakarta.jms.Session sess,
                        OutboundConnection cnx)
        Constructs an OutboundSession instance.
      • OutboundSession

        OutboundSession​(jakarta.jms.Session sess,
                        OutboundConnection cnx,
                        boolean transacted)
        Constructs an OutboundSession instance.
    • Method Detail

      • isStarted

        public boolean isStarted()
        return started value.
      • start

        void start()
        set started = true
      • checkValidity

        void checkValidity()
                    throws jakarta.jms.IllegalStateException
        Checks the validity of the session.
        Throws:
        jakarta.jms.IllegalStateException
      • getAcknowledgeMode

        public int getAcknowledgeMode()
                               throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        getAcknowledgeMode in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • getTransacted

        public boolean getTransacted()
                              throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        getTransacted in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • setMessageListener

        public void setMessageListener​(jakarta.jms.MessageListener messageListener)
                                throws jakarta.jms.JMSException
        Forbidden call on a component's outbound session, throws a IllegalStateException instance.
        Specified by:
        setMessageListener in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • getMessageListener

        public jakarta.jms.MessageListener getMessageListener()
                                                       throws jakarta.jms.JMSException
        Forbidden call on a component's outbound session, throws a IllegalStateException instance.
        Specified by:
        getMessageListener in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createMessage

        public jakarta.jms.Message createMessage()
                                          throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createTextMessage

        public jakarta.jms.TextMessage createTextMessage()
                                                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createTextMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createTextMessage

        public jakarta.jms.TextMessage createTextMessage​(String text)
                                                  throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createTextMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createBytesMessage

        public jakarta.jms.BytesMessage createBytesMessage()
                                                    throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createBytesMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createMapMessage

        public jakarta.jms.MapMessage createMapMessage()
                                                throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createMapMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createObjectMessage

        public jakarta.jms.ObjectMessage createObjectMessage()
                                                      throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createObjectMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createObjectMessage

        public jakarta.jms.ObjectMessage createObjectMessage​(Serializable obj)
                                                      throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createObjectMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createStreamMessage

        public jakarta.jms.StreamMessage createStreamMessage()
                                                      throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createStreamMessage in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createBrowser

        public jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue,
                                                      String selector)
                                               throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createBrowser in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createBrowser

        public jakarta.jms.QueueBrowser createBrowser​(jakarta.jms.Queue queue)
                                               throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createBrowser in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createProducer

        public jakarta.jms.MessageProducer createProducer​(jakarta.jms.Destination dest)
                                                   throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createProducer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createConsumer

        public jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest,
                                                          String selector,
                                                          boolean noLocal)
                                                   throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createConsumer

        public jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest,
                                                          String selector)
                                                   throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createConsumer

        public jakarta.jms.MessageConsumer createConsumer​(jakarta.jms.Destination dest)
                                                   throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createDurableSubscriber

        public jakarta.jms.TopicSubscriber createDurableSubscriber​(jakarta.jms.Topic topic,
                                                                   String name,
                                                                   String selector,
                                                                   boolean noLocal)
                                                            throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createDurableSubscriber in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createDurableSubscriber

        public jakarta.jms.TopicSubscriber createDurableSubscriber​(jakarta.jms.Topic topic,
                                                                   String name)
                                                            throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createDurableSubscriber in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createQueue

        public jakarta.jms.Queue createQueue​(String queueName)
                                      throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createQueue in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createTopic

        public jakarta.jms.Topic createTopic​(String topicName)
                                      throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createTopic in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createTemporaryQueue

        public jakarta.jms.TemporaryQueue createTemporaryQueue()
                                                        throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createTemporaryQueue in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createTemporaryTopic

        public jakarta.jms.TemporaryTopic createTemporaryTopic()
                                                        throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createTemporaryTopic in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • run

        public void run()
        Method never used by a component, does nothing.
        Specified by:
        run in interface Runnable
        Specified by:
        run in interface jakarta.jms.Session
      • commit

        public void commit()
                    throws jakarta.jms.JMSException
        Forbidden call on a component's outbound session, throws a IllegalStateException instance.
        Specified by:
        commit in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • rollback

        public void rollback()
                      throws jakarta.jms.JMSException
        Forbidden call on a component's outbound session, throws a IllegalStateException instance.
        Specified by:
        rollback in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • recover

        public void recover()
                     throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        recover in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • unsubscribe

        public void unsubscribe​(String name)
                         throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        unsubscribe in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • close

        public void close()
                   throws jakarta.jms.JMSException
        In Java EE, closing of the session occurs while closing the component's connection.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createSharedConsumer

        public jakarta.jms.MessageConsumer createSharedConsumer​(jakarta.jms.Topic topic,
                                                                String sharedSubscriptionName)
                                                         throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createSharedConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createSharedConsumer

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

        public jakarta.jms.MessageConsumer createDurableConsumer​(jakarta.jms.Topic topic,
                                                                 String name)
                                                          throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createDurableConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createDurableConsumer

        public jakarta.jms.MessageConsumer createDurableConsumer​(jakarta.jms.Topic topic,
                                                                 String name,
                                                                 String messageSelector,
                                                                 boolean noLocal)
                                                          throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createDurableConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createSharedDurableConsumer

        public jakarta.jms.MessageConsumer createSharedDurableConsumer​(jakarta.jms.Topic topic,
                                                                       String name)
                                                                throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createSharedDurableConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException
      • createSharedDurableConsumer

        public jakarta.jms.MessageConsumer createSharedDurableConsumer​(jakarta.jms.Topic topic,
                                                                       String name,
                                                                       String messageSelector)
                                                                throws jakarta.jms.JMSException
        Delegates the call to the wrapped JMS session.
        Specified by:
        createSharedDurableConsumer in interface jakarta.jms.Session
        Throws:
        jakarta.jms.JMSException