org.ow2.jotm.jms
Class JQueueSession

java.lang.Object
  extended by org.ow2.jotm.jms.JSession
      extended by org.ow2.jotm.jms.JQueueSession
All Implemented Interfaces:
Runnable, QueueSession, Session, Synchronization

public class JQueueSession
extends JSession
implements QueueSession

Implementation of the QueueSession interface. It's a wrapper above 2 types of Sessions: - one outside transactions - one inside transactions.


Field Summary
protected  XAQueueConnection xaqc
           
 
Fields inherited from class org.ow2.jotm.jms.JSession
closed, currtx, jconn, logger, sess, tm, txover, xac, xares, xasess
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
 
Constructor Summary
JQueueSession(JConnection jconn, XAQueueConnection xaqc, org.objectweb.util.monolog.api.Logger logger)
          Constructor
 
Method Summary
 QueueBrowser createBrowser(Queue queue)
           
 QueueBrowser createBrowser(Queue queue, String messageSelector)
           
 Queue createQueue(String queueName)
           
 QueueReceiver createReceiver(Queue queue)
           
 QueueReceiver createReceiver(Queue queue, String messageSelector)
           
 QueueSender createSender(Queue queue)
           
 TemporaryQueue createTemporaryQueue()
           
protected  QueueSession getMOMQueueSession()
          Get the underlaying MOM Session.
 
Methods inherited from class org.ow2.jotm.jms.JSession
afterCompletion, beforeCompletion, close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, getMOMSession, getTransacted, getXAResource, MOMSessionClose, PhysicalClose, recover, rollback, run, setMessageListener, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener, unsubscribe
 

Field Detail

xaqc

protected XAQueueConnection xaqc
Constructor Detail

JQueueSession

public JQueueSession(JConnection jconn,
                     XAQueueConnection xaqc,
                     org.objectweb.util.monolog.api.Logger logger)
Constructor

Parameters:
jconn - the JConnection creating this Session
xaqc - the associated XAConnection
Method Detail

getMOMQueueSession

protected QueueSession getMOMQueueSession()
                                   throws JMSException
Get the underlaying MOM Session.

Returns:
the appropriate QueueSession, depending on the transaction context.
Throws:
JMSException - Session could not be created.

createBrowser

public QueueBrowser createBrowser(Queue queue)
                           throws JMSException
Specified by:
createBrowser in interface QueueSession
Specified by:
createBrowser in interface Session
Overrides:
createBrowser in class JSession
Throws:
JMSException

createBrowser

public QueueBrowser createBrowser(Queue queue,
                                  String messageSelector)
                           throws JMSException
Specified by:
createBrowser in interface QueueSession
Specified by:
createBrowser in interface Session
Overrides:
createBrowser in class JSession
Throws:
JMSException

createQueue

public Queue createQueue(String queueName)
                  throws JMSException
Specified by:
createQueue in interface QueueSession
Specified by:
createQueue in interface Session
Overrides:
createQueue in class JSession
Throws:
JMSException

createReceiver

public QueueReceiver createReceiver(Queue queue)
                             throws JMSException
Specified by:
createReceiver in interface QueueSession
Throws:
JMSException

createReceiver

public QueueReceiver createReceiver(Queue queue,
                                    String messageSelector)
                             throws JMSException
Specified by:
createReceiver in interface QueueSession
Throws:
JMSException

createSender

public QueueSender createSender(Queue queue)
                         throws JMSException
Specified by:
createSender in interface QueueSession
Throws:
JMSException

createTemporaryQueue

public TemporaryQueue createTemporaryQueue()
                                    throws JMSException
Specified by:
createTemporaryQueue in interface QueueSession
Specified by:
createTemporaryQueue in interface Session
Overrides:
createTemporaryQueue in class JSession
Throws:
JMSException


Copyright ? 2008 OW2 Consortium. All Rights Reserved.