org.objectweb.jonas_jms
Class JQueueConnection
java.lang.Object
org.objectweb.jonas_jms.JConnection
org.objectweb.jonas_jms.JQueueConnection
- All Implemented Interfaces:
- javax.jms.Connection, javax.jms.QueueConnection
public class JQueueConnection
- extends JConnection
- implements javax.jms.QueueConnection
- Author:
- Laurent Chauvirey, Frederic Maistre, Nicolas Tachker
Contributor(s):
Philippe Durieux
Jeff Mesnil
Field Summary |
protected javax.jms.XAQueueConnection |
xaqc
|
Constructor Summary |
JQueueConnection(JConnectionFactory jcf,
javax.jms.XAQueueConnectionFactory xaqcf)
Constructor of a JQueueConnection for an anonymous user. |
JQueueConnection(JConnectionFactory jcf,
javax.jms.XAQueueConnectionFactory xaqcf,
java.lang.String user,
java.lang.String passwd)
Constructor of a JQueueConnection for a specified user. |
Method Summary |
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Queue queue,
java.lang.String selector,
javax.jms.ServerSessionPool pool,
int maxmessages)
Create a connection consumer for this connection |
javax.jms.QueueSession |
createQueueSession(boolean transacted,
int acknowledgeMode)
Create a Queue Session |
Methods inherited from class org.objectweb.jonas_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 |
xaqc
protected javax.jms.XAQueueConnection xaqc
JQueueConnection
public JQueueConnection(JConnectionFactory jcf,
javax.jms.XAQueueConnectionFactory xaqcf,
java.lang.String user,
java.lang.String passwd)
throws javax.jms.JMSException
- Constructor of a JQueueConnection for a specified user.
- Parameters:
user
- user's namepasswd
- user's password
- Throws:
javax.jms.JMSException
JQueueConnection
public JQueueConnection(JConnectionFactory jcf,
javax.jms.XAQueueConnectionFactory xaqcf)
throws javax.jms.JMSException
- Constructor of a JQueueConnection for an anonymous user.
- Throws:
javax.jms.JMSException
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue,
java.lang.String selector,
javax.jms.ServerSessionPool pool,
int maxmessages)
throws javax.jms.JMSException
- Create a connection consumer for this connection
- Specified by:
createConnectionConsumer
in interface javax.jms.QueueConnection
- Parameters:
queue
- - the queue to accessselector
- - only messages with properties matching the message
selector expression aredeliveredsessionPool
- - 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:
javax.jms.JMSException
- - if JMS Connection fails to create a a connection consumer
due to some internal error or invalid arguments for sessionPool and message selector.
InvalidSelectorException
- - if the message selector is invalid.
createQueueSession
public javax.jms.QueueSession createQueueSession(boolean transacted,
int acknowledgeMode)
throws javax.jms.JMSException
- Create a Queue Session
- Specified by:
createQueueSession
in interface javax.jms.QueueConnection
- 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 queue session.
- Throws:
javax.jms.JMSException
- - if JMS Connection fails to create a session.