Class MessageConsumerWrapper

java.lang.Object
bitronix.tm.resource.jms.MessageConsumerWrapper
All Implemented Interfaces:
AutoCloseable, javax.jms.MessageConsumer
Direct Known Subclasses:
TopicSubscriberWrapper

public class MessageConsumerWrapper extends Object implements javax.jms.MessageConsumer
MessageConsumer wrapper that adds XA enlistment semantics.
Author:
lorban
  • Field Details

  • Constructor Details

  • Method Details

    • getMessageConsumer

      public javax.jms.MessageConsumer getMessageConsumer()
    • enlistResource

      protected void enlistResource() throws javax.jms.JMSException
      Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource. If no transaction is running then this method does nothing.
      Throws:
      javax.jms.JMSException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • receive

      public javax.jms.Message receive() throws javax.jms.JMSException
      Specified by:
      receive in interface javax.jms.MessageConsumer
      Throws:
      javax.jms.JMSException
    • receive

      public javax.jms.Message receive(long timeout) throws javax.jms.JMSException
      Specified by:
      receive in interface javax.jms.MessageConsumer
      Throws:
      javax.jms.JMSException
    • receiveNoWait

      public javax.jms.Message receiveNoWait() throws javax.jms.JMSException
      Specified by:
      receiveNoWait in interface javax.jms.MessageConsumer
      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.MessageConsumer
      Throws:
      javax.jms.JMSException
    • getMessageSelector

      public String getMessageSelector() throws javax.jms.JMSException
      Specified by:
      getMessageSelector in interface javax.jms.MessageConsumer
      Throws:
      javax.jms.JMSException
    • getMessageListener

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

      public void setMessageListener(javax.jms.MessageListener listener) throws javax.jms.JMSException
      Specified by:
      setMessageListener in interface javax.jms.MessageConsumer
      Throws:
      javax.jms.JMSException