Package org.apache.activemq
Class ActiveMQXAConnection
- java.lang.Object
-
- org.apache.activemq.ActiveMQConnection
-
- org.apache.activemq.ActiveMQXAConnection
-
- All Implemented Interfaces:
AutoCloseable,javax.jms.Connection,javax.jms.QueueConnection,javax.jms.TopicConnection,javax.jms.XAConnection,javax.jms.XAQueueConnection,javax.jms.XATopicConnection,Closeable,EnhancedConnection,StatsCapable,TransportListener
public class ActiveMQXAConnection extends ActiveMQConnection implements javax.jms.XATopicConnection, javax.jms.XAQueueConnection, javax.jms.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.- See Also:
Connection,ConnectionFactory,QueueConnection,TopicConnection,TopicConnectionFactory,QueueConnection,QueueConnectionFactory
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.ActiveMQConnection
activeTempDestinations, alwaysSessionAsync, DEFAULT_BROKER_URL, DEFAULT_PASSWORD, DEFAULT_THREAD_POOL_SIZE, DEFAULT_USER, dispatchAsync, transportInterruptionProcessingComplete
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedActiveMQXAConnection(Transport transport, IdGenerator clientIdGenerator, IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jms.SessioncreateSession(boolean transacted, int acknowledgeMode)Creates aSessionobject.javax.jms.XAQueueSessioncreateXAQueueSession()javax.jms.XASessioncreateXASession()javax.jms.XATopicSessioncreateXATopicSession()intgetXaAckMode()voidsetXaAckMode(int xaAckMode)-
Methods inherited from class org.apache.activemq.ActiveMQConnection
addConnectionConsumer, addDispatcher, addProducer, addSession, addTransportListener, asyncSendPacket, changeUserInfo, checkClientIDWasManuallySpecified, checkClosed, checkClosedOrFailed, cleanup, cleanUpTempDestinations, close, createBlobTransferPolicy, createConnectionConsumer, createConnectionConsumer, createConnectionConsumer, createConnectionConsumer, createDurableConnectionConsumer, createDurableConnectionConsumer, createQueueSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, createTempDestination, createTopicSession, deleteTempDestination, destroyDestination, doCleanup, ensureConnectionInfoSent, getBlobTransferPolicy, getBrokerInfo, getBrokerName, getClientID, getClientInternalExceptionListener, getCloseTimeout, getConnectionInfo, getConnectionStats, getConnectResponseTimeout, getConsumerFailoverRedeliveryWaitPeriod, getDestinationSource, getExceptionListener, getExecutor, getFirstFailureError, getInitializedClientID, getLocalTransactionIdGenerator, getMaxThreadPoolSize, getMetaData, getNextSessionId, getOptimizeAcknowledgeTimeOut, getOptimizedAckScheduledAckInterval, getPrefetchPolicy, getProducerWindowSize, getProtocolVersion, getRedeliveryPolicy, getRedeliveryPolicyMap, getRejectedTaskHandler, getResourceManagerId, getScheduler, getSendTimeout, getSessions, getSessionTaskRunner, getStats, getTimeCreated, getTransformer, getTransport, getTransportChannel, getTrustedPackages, getWarnAboutUnstartedConnectionTimeout, hasDispatcher, isAlwaysSessionAsync, isAlwaysSyncSend, isCheckForDuplicates, isClosed, isClosing, isConsumerExpiryCheckEnabled, isCopyMessageOnSend, isDeleted, isDisableTimeStampsByDefault, isDispatchAsync, isDuplicate, isExclusiveConsumer, isMessagePrioritySupported, isNestedMapAndListEnabled, isNonBlockingRedelivery, isObjectMessageSerializationDefered, isOptimizeAcknowledge, isOptimizedMessageDispatch, isRmIdFromConnectionId, isSendAcksAsync, isStarted, isStatsEnabled, isTransactedIndividualAck, isTransportFailed, isTrustAllPackages, isUseAsyncSend, isUseCompression, isUseDedicatedTaskRunner, isUseRetroactiveConsumer, isUserSpecifiedClientID, isWatchTopicAdvisories, makeConnection, makeConnection, makeConnection, onAsyncException, onClientInternalException, onCommand, onConnectionControl, onConsumerControl, onException, onWireFormatInfo, removeConnectionConsumer, removeDispatcher, removeDispatcher, removeProducer, removeSession, removeTransportListener, rollbackDuplicate, setAlwaysSessionAsync, setAlwaysSyncSend, setAuditDepth, setAuditMaximumProducerNumber, setBlobTransferPolicy, setCheckForDuplicates, setClientID, setClientInternalExceptionListener, setCloseTimeout, setConnectResponseTimeout, setConsumerExpiryCheckEnabled, setConsumerFailoverRedeliveryWaitPeriod, setCopyMessageOnSend, setDefaultClientID, setDisableTimeStampsByDefault, setDispatchAsync, setExceptionListener, setExclusiveConsumer, setMaxThreadPoolSize, setMessagePrioritySupported, setNestedMapAndListEnabled, setNonBlockingRedelivery, setObjectMessageSerializationDefered, setOptimizeAcknowledge, setOptimizeAcknowledgeTimeOut, setOptimizedAckScheduledAckInterval, setOptimizedMessageDispatch, setPassword, setPrefetchPolicy, setProducerWindowSize, setRedeliveryPolicy, setRedeliveryPolicyMap, setRejectedTaskHandler, setRmIdFromConnectionId, setSendAcksAsync, setSendTimeout, setSessionTaskRunner, setStatsEnabled, setTransactedIndividualAck, setTransformer, setTrustAllPackages, setTrustedPackages, setUseAsyncSend, setUseCompression, setUseDedicatedTaskRunner, setUseRetroactiveConsumer, setUserName, setWarnAboutUnstartedConnectionTimeout, setWatchTopicAdvisories, start, stop, syncSendPacket, syncSendPacket, syncSendPacket, toString, transportFailed, transportInterruptionProcessingComplete, transportInterupted, transportResumed, unsubscribe, waitForTransportInterruptionProcessingToComplete
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
-
-
-
-
Constructor Detail
-
ActiveMQXAConnection
protected ActiveMQXAConnection(Transport transport, IdGenerator clientIdGenerator, IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats) throws Exception
- Throws:
Exception
-
-
Method Detail
-
createXASession
public javax.jms.XASession createXASession() throws javax.jms.JMSException- Specified by:
createXASessionin interfacejavax.jms.XAConnection- Throws:
javax.jms.JMSException
-
createXATopicSession
public javax.jms.XATopicSession createXATopicSession() throws javax.jms.JMSException- Specified by:
createXATopicSessionin interfacejavax.jms.XATopicConnection- Throws:
javax.jms.JMSException
-
createXAQueueSession
public javax.jms.XAQueueSession createXAQueueSession() throws javax.jms.JMSException- Specified by:
createXAQueueSessionin interfacejavax.jms.XAQueueConnection- Throws:
javax.jms.JMSException
-
createSession
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSExceptionDescription copied from class:ActiveMQConnectionCreates aSessionobject.- Specified by:
createSessionin interfacejavax.jms.Connection- Specified by:
createSessionin interfacejavax.jms.XAConnection- Overrides:
createSessionin classActiveMQConnection- 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 areSession.AUTO_ACKNOWLEDGE,Session.CLIENT_ACKNOWLEDGE, andSession.DUPS_OK_ACKNOWLEDGE.- Returns:
- a newly created session
- Throws:
javax.jms.JMSException- if theConnectionobject 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
-
setXaAckMode
public void setXaAckMode(int xaAckMode)
-
getXaAckMode
public int getXaAckMode()
-
-