org.objectweb.jonas_jms
Class JQueueConnection
java.lang.Object
org.objectweb.jonas_jms.JConnection
org.objectweb.jonas_jms.JQueueConnection
- All Implemented Interfaces:
- Connection, QueueConnection
public class JQueueConnection
- extends JConnection
- implements QueueConnection
- Author:
- Laurent Chauvirey, Frederic Maistre, Nicolas Tachker
Contributor(s):
Philippe Durieux
Jeff Mesnil
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 XAQueueConnection xaqc
JQueueConnection
public JQueueConnection(JConnectionFactory jcf,
XAQueueConnectionFactory xaqcf,
String user,
String passwd)
throws JMSException
- Constructor of a JQueueConnection for a specified user.
- Parameters:
user
- user's namepasswd
- user's password
- Throws:
JMSException
JQueueConnection
public JQueueConnection(JConnectionFactory jcf,
XAQueueConnectionFactory xaqcf)
throws JMSException
- Constructor of a JQueueConnection for an anonymous user.
- Throws:
JMSException
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 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:
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 QueueSession createQueueSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Create a Queue Session
- Specified by:
createQueueSession
in interface 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:
JMSException
- - if JMS Connection fails to create a session.
Copyright © 2007 OW2 Consortium. All Rights Reserved.