org.ow2.jotm.jms
Class JQueueConnection

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

public class JQueueConnection
extends JConnection
implements QueueConnection


Field Summary
protected  XAQueueConnection xaqc
           
 
Fields inherited from class org.ow2.jotm.jms.JConnection
closed, globaltx, INTERNAL_USER_NAME, jcf, logger, sessionlist, tm, user, xac
 
Constructor Summary
JQueueConnection(JConnectionFactory jcf, XAQueueConnectionFactory xaqcf, org.objectweb.util.monolog.api.Logger logger)
          Constructor of a JQueueConnection for an anonymous user.
JQueueConnection(JConnectionFactory jcf, XAQueueConnectionFactory xaqcf, String user, String passwd, org.objectweb.util.monolog.api.Logger logger)
          Constructor of a JQueueConnection for a specified user.
 
Method Summary
 ConnectionConsumer createConnectionConsumer(Queue queue, String selector, ServerSessionPool pool, int maxmessages)
          Create a connection consumer for this connection
 QueueSession createQueueSession(boolean transacted, int acknowledgeMode)
          Create a Queue Session
 
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.Connection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
 

Field Detail

xaqc

protected XAQueueConnection xaqc
Constructor Detail

JQueueConnection

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

Parameters:
jcf - the Connection Factory
xaqcf - the MOM XAQueueConnectionFactory
user - user's name
passwd - user's password
Throws:
JMSException - - if JMS fails to create XA queue connection

JQueueConnection

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

Parameters:
jcf - the Connection Factory
xaqcf - the MOM XAQueueConnectionFactory
Throws:
JMSException - - if JMS fails to create XA queue connection
Method Detail

createConnectionConsumer

public ConnectionConsumer createConnectionConsumer(Queue queue,
                                                   String selector,
                                                   ServerSessionPool pool,
                                                   int maxmessages)
                                            throws JMSException
Create a connection consumer for this connection

Specified by:
createConnectionConsumer in interface QueueConnection
Parameters:
queue - - the queue to access
selector - - only messages with properties matching the message selector expression aredelivered
pool - - the server session pool to associate with this connection consumer.
maxmessages - - the maximum number of messages that can be assigned to a server session at one time.
Returns:
the connection consumer.
Throws:
JMSException - - if JMS Connection fails to create a a connection consumer due to some internal error or invalid arguments for sessionPool and message selector.

createQueueSession

public QueueSession createQueueSession(boolean transacted,
                                       int acknowledgeMode)
                                throws JMSException
Create a Queue Session

Specified by:
createQueueSession in interface QueueConnection
Parameters:
transacted - not used: Session always transacted.
acknowledgeMode - ignored
Returns:
a newly created queue session.
Throws:
JMSException - JMS Connection failed to create a session.


Copyright ? 2008 OW2 Consortium. All Rights Reserved.