org.ow2.jotm.jms
Class JTopicSession

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

public class JTopicSession
extends JSession
implements TopicSession

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


Field Summary
protected  XATopicConnection xatc
           
 
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
JTopicSession(JConnection jconn, XATopicConnection xatc, org.objectweb.util.monolog.api.Logger logger)
          Constructor
 
Method Summary
 TopicSubscriber createDurableSubscriber(Topic topic, String name)
           
 TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal)
           
 TopicPublisher createPublisher(Topic topic)
           
 TopicSubscriber createSubscriber(Topic topic)
           
 TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal)
           
 TemporaryTopic createTemporaryTopic()
           
 Topic createTopic(String topicName)
           
protected  TopicSession getMOMTopicSession()
          Get the underlaying MOM Session.
 void unsubscribe(String name)
           
 
Methods inherited from class org.ow2.jotm.jms.JSession
afterCompletion, beforeCompletion, close, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getMOMSession, getTransacted, getXAResource, MOMSessionClose, PhysicalClose, recover, rollback, run, setMessageListener
 
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, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
 

Field Detail

xatc

protected XATopicConnection xatc
Constructor Detail

JTopicSession

public JTopicSession(JConnection jconn,
                     XATopicConnection xatc,
                     org.objectweb.util.monolog.api.Logger logger)
Constructor

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

getMOMTopicSession

protected TopicSession getMOMTopicSession()
                                   throws JMSException
Get the underlaying MOM Session.

Throws:
JMSException

createTopic

public Topic createTopic(String topicName)
                  throws JMSException
Specified by:
createTopic in interface Session
Specified by:
createTopic in interface TopicSession
Overrides:
createTopic in class JSession
Throws:
JMSException

createSubscriber

public TopicSubscriber createSubscriber(Topic topic)
                                 throws JMSException
Specified by:
createSubscriber in interface TopicSession
Throws:
JMSException

createSubscriber

public TopicSubscriber createSubscriber(Topic topic,
                                        String messageSelector,
                                        boolean noLocal)
                                 throws JMSException
Specified by:
createSubscriber in interface TopicSession
Throws:
JMSException

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               String name)
                                        throws JMSException
Specified by:
createDurableSubscriber in interface Session
Specified by:
createDurableSubscriber in interface TopicSession
Overrides:
createDurableSubscriber in class JSession
Throws:
JMSException

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               String name,
                                               String messageSelector,
                                               boolean noLocal)
                                        throws JMSException
Specified by:
createDurableSubscriber in interface Session
Specified by:
createDurableSubscriber in interface TopicSession
Overrides:
createDurableSubscriber in class JSession
Throws:
JMSException

createPublisher

public TopicPublisher createPublisher(Topic topic)
                               throws JMSException
Specified by:
createPublisher in interface TopicSession
Throws:
JMSException

createTemporaryTopic

public TemporaryTopic createTemporaryTopic()
                                    throws JMSException
Specified by:
createTemporaryTopic in interface Session
Specified by:
createTemporaryTopic in interface TopicSession
Overrides:
createTemporaryTopic in class JSession
Throws:
JMSException

unsubscribe

public void unsubscribe(String name)
                 throws JMSException,
                        InvalidDestinationException
Specified by:
unsubscribe in interface Session
Specified by:
unsubscribe in interface TopicSession
Overrides:
unsubscribe in class JSession
Throws:
JMSException
InvalidDestinationException


Copyright ? 2005-2010 OW2 Consortium. All Rights Reserved.