org.ow2.jotm.jms
Class JTopicConnection

java.lang.Object
  extended by org.ow2.jotm.jms.JConnection
      extended by org.ow2.jotm.jms.JTopicConnection
All Implemented Interfaces:
Connection, TopicConnection

public class JTopicConnection
extends JConnection
implements TopicConnection


Field Summary
protected  XATopicConnection xatc
           
 
Fields inherited from class org.ow2.jotm.jms.JConnection
closed, globaltx, INTERNAL_USER_NAME, jcf, logger, sessionlist, tm, user, xac
 
Constructor Summary
JTopicConnection(JConnectionFactory jcf, XATopicConnectionFactory xatcf, org.objectweb.util.monolog.api.Logger logger)
          Constructor of a JQueueConnection for an anonymous user.
JTopicConnection(JConnectionFactory jcf, XATopicConnectionFactory xatcf, String user, String passwd, org.objectweb.util.monolog.api.Logger logger)
          Constructor of a JTopicConnection for a specified user.
 
Method Summary
 ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
           
 TopicSession createTopicSession(boolean transacted, int acknowledgeMode)
          Create a TopicSession
 
Methods inherited from class org.ow2.jotm.jms.JConnection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, finalClose, getClientID, getExceptionListener, getMetaData, getUser, sessionClose, sessionOpen, setClientID, setExceptionListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.TopicConnection
createDurableConnectionConsumer
 
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createSession, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
 

Field Detail

xatc

protected XATopicConnection xatc
Constructor Detail

JTopicConnection

public JTopicConnection(JConnectionFactory jcf,
                        XATopicConnectionFactory xatcf,
                        String user,
                        String passwd,
                        org.objectweb.util.monolog.api.Logger logger)
                 throws JMSException
Constructor of a JTopicConnection for a specified user.

Parameters:
jcf - the Connection Factory
xatcf - the MOM XATopicConnectionFactory
user - user's name
passwd - user's password
Throws:
JMSException - - if JMS fails to create XA Topic connection

JTopicConnection

public JTopicConnection(JConnectionFactory jcf,
                        XATopicConnectionFactory xatcf,
                        org.objectweb.util.monolog.api.Logger logger)
                 throws JMSException
Constructor of a JQueueConnection for an anonymous user.

Throws:
JMSException
Method Detail

createTopicSession

public TopicSession createTopicSession(boolean transacted,
                                       int acknowledgeMode)
                                throws JMSException
Create a TopicSession

Specified by:
createTopicSession in interface TopicConnection
Parameters:
transacted - - if true, the session is transacted.
acknowledgeMode - - indicates whether the consumer or the client will acknowledge any messages it receives. This parameter will be ignored if the session is transacted.
Returns:
a newly created topic session.
Throws:
JMSException - - if JMS Connection fails to create a session.

createConnectionConsumer

public ConnectionConsumer createConnectionConsumer(Topic topic,
                                                   String messageSelector,
                                                   ServerSessionPool sessionPool,
                                                   int maxMessages)
                                            throws JMSException
Specified by:
createConnectionConsumer in interface TopicConnection
Throws:
JMSException - - if JMS Connection fails to create a ConnectionConsumer


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