org.codehaus.activemq
Class ActiveMQXAConnection
java.lang.Object
org.codehaus.activemq.ActiveMQConnection
org.codehaus.activemq.ActiveMQXAConnection
- All Implemented Interfaces:
- CapacityMonitorEventListener, Closeable, Connection, ExceptionListener, PacketListener, QueueConnection, StatsCapable, TopicConnection, TransportStatusEventListener, XAConnection, XAQueueConnection, XATopicConnection
- public class ActiveMQXAConnection
- extends ActiveMQConnection
- implements XATopicConnection, XAQueueConnection, XAConnection
The XAConnection interface extends the capability of Connection by providing
an XASession (optional).
The XAConnection interface is optional. JMS providers are not required to
support this interface. This interface is for use by JMS providers to
support transactional environments. Client programs are strongly encouraged
to use the transactional support available in their environment, rather
than use these XA interfaces directly.
- Version:
- $Revision: 1.5 $
- See Also:
Connection
,
ConnectionFactory
,
QueueConnection
,
TopicConnection
,
TopicConnectionFactory
,
QueueConnection
,
QueueConnectionFactory
Methods inherited from class org.codehaus.activemq.ActiveMQConnection |
addConnectionConsumer, addMessageDispatcher, addSession, asyncSendPacket, asyncSendPacket, capacityChanged, checkClientIDWasManuallySpecified, checkClosed, clearMessagesInProgress, close, consume, createConnectionConsumer, createConnectionConsumer, createConnectionConsumer, createDurableConnectionConsumer, destroyDestination, doReconnect, generateSessionId, getClientID, getConnectionMemoryLimit, getConnectionStats, getExceptionListener, getInitializedClientID, getMemoryBoundedQueue, getMetaData, getNextConsumerNumber, getPrefetchPolicy, getSendCloseTimeout, getSendConnectionInfoTimeout, getStats, getTransportChannel, handleAsyncException, isJ2EEcompliant, isStarted, isUseAsyncSend, makeConnection, makeConnection, makeConnection, onException, removeConnectionConsumer, removeMessageDispatcher, removeSession, sendConnectionInfoToBroker, sendConnectionInfoToBroker, setClientID, setConnectionMemoryLimit, setExceptionListener, setJ2EEcompliant, setPrefetchPolicy, setSendCloseTimeout, setSendConnectionInfoTimeout, setUseAsyncSend, start, statusChanged, stop, syncSendPacket, syncSendPacket, syncSendRequest |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActiveMQXAConnection
public ActiveMQXAConnection(ActiveMQConnectionFactory factory,
String theUserName,
String thePassword,
TransportChannel transportChannel)
throws JMSException
ActiveMQXAConnection
public ActiveMQXAConnection(ActiveMQConnectionFactory factory,
String theUserName,
String thePassword)
throws JMSException
createXASession
public XASession createXASession()
throws JMSException
- Specified by:
createXASession
in interface XAConnection
- Throws:
JMSException
createQueueSession
public QueueSession createQueueSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Description copied from class:
ActiveMQConnection
- Creates a
QueueSession
object.
- Specified by:
createQueueSession
in interface XAQueueConnection
- Overrides:
createQueueSession
in class ActiveMQConnection
- Parameters:
transacted
- indicates whether the session is transactedacknowledgeMode
- indicates whether the consumer or the client will acknowledge any messages it receives;
ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
, and Session.DUPS_OK_ACKNOWLEDGE
.
- Returns:
- a newly created queue session
- Throws:
JMSException
- if the QueueConnection
object fails to create a session due to some internal
error or lack of support for the specific transaction and acknowledgement mode.- See Also:
Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
createTopicSession
public TopicSession createTopicSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Description copied from class:
ActiveMQConnection
- Creates a
TopicSession
object.
- Specified by:
createTopicSession
in interface XATopicConnection
- Overrides:
createTopicSession
in class ActiveMQConnection
- Parameters:
transacted
- indicates whether the session is transactedacknowledgeMode
- indicates whether the consumer or the client will acknowledge any messages it receives;
ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
, and Session.DUPS_OK_ACKNOWLEDGE
.
- Returns:
- a newly created topic session
- Throws:
JMSException
- if the TopicConnection
object fails to create a session due to some internal
error or lack of support for the specific transaction and acknowledgement mode.- See Also:
Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
createSession
public Session createSession(boolean transacted,
int acknowledgeMode)
throws JMSException
- Description copied from class:
ActiveMQConnection
- Creates a
Session
object.
- Specified by:
createSession
in interface XAConnection
- Overrides:
createSession
in class ActiveMQConnection
- Parameters:
transacted
- indicates whether the session is transactedacknowledgeMode
- indicates whether the consumer or the client will acknowledge any messages it receives;
ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
, and Session.DUPS_OK_ACKNOWLEDGE
.
- Returns:
- a newly created session
- Throws:
JMSException
- if the Connection
object fails to create a session due to some internal error
or lack of support for the specific transaction and acknowledgement mode.- See Also:
Session.AUTO_ACKNOWLEDGE
,
Session.CLIENT_ACKNOWLEDGE
,
Session.DUPS_OK_ACKNOWLEDGE
createXATopicSession
public XATopicSession createXATopicSession()
throws JMSException
- Specified by:
createXATopicSession
in interface XATopicConnection
- Throws:
JMSException
createXAQueueSession
public XAQueueSession createXAQueueSession()
throws JMSException
- Specified by:
createXAQueueSession
in interface XAQueueConnection
- Throws:
JMSException
createActiveMQXASession
protected ActiveMQXASession createActiveMQXASession(int acknowledgeMode)
throws JMSException
- Throws:
JMSException
getResourceManagerId
public String getResourceManagerId()
- Returns:
- Returns the resourceManagerId.
Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.