org.apache.activemq
Class ActiveMQXAConnection

java.lang.Object
  extended by org.apache.activemq.ActiveMQConnection
      extended by org.apache.activemq.ActiveMQXAConnection
All Implemented Interfaces:
Connection, QueueConnection, TopicConnection, XAConnection, XAQueueConnection, XATopicConnection, Closeable, EnhancedConnection, StatsCapable, StreamConnection, TransportListener

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.

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
protected ActiveMQXAConnection(Transport transport, IdGenerator clientIdGenerator, IdGenerator connectionIdGenerator, JMSStatsImpl factoryStats)
           
 
Method Summary
 Session createSession(boolean transacted, int acknowledgeMode)
          Creates a Session object.
 XAQueueSession createXAQueueSession()
           
 XASession createXASession()
           
 XATopicSession createXATopicSession()
           
 
Methods inherited from class org.apache.activemq.ActiveMQConnection
addConnectionConsumer, addDispatcher, addInputStream, addOutputStream, addProducer, addSession, addTransportListener, asyncSendPacket, changeUserInfo, checkClientIDWasManuallySpecified, checkClosed, checkClosedOrFailed, cleanup, cleanUpTempDestinations, close, createBlobTransferPolicy, createConnectionConsumer, createConnectionConsumer, createConnectionConsumer, createConnectionConsumer, createDurableConnectionConsumer, createDurableConnectionConsumer, createDurableInputStream, createDurableInputStream, createDurableInputStream, createDurableInputStream, createInputStream, createInputStream, createInputStream, createInputStream, createNonPersistentOutputStream, createOutputStream, createOutputStream, createQueueSession, createTempDestination, createTopicSession, deleteTempDestination, destroyDestination, ensureConnectionInfoSent, finalize, getBlobTransferPolicy, getBrokerInfo, getBrokerName, getClientID, getClientInternalExceptionListener, getCloseTimeout, getConnectionInfo, getConnectionStats, getConsumerFailoverRedeliveryWaitPeriod, getDestinationSource, getExceptionListener, getExecutor, getFirstFailureError, getInitializedClientID, getLocalTransactionIdGenerator, getMaxThreadPoolSize, getMetaData, getNextSessionId, getOptimizeAcknowledgeTimeOut, getOptimizedAckScheduledAckInterval, getPrefetchPolicy, getProducerWindowSize, getProtocolVersion, getRedeliveryPolicy, getRedeliveryPolicyMap, getRejectedTaskHandler, getResourceManagerId, getScheduler, getSendTimeout, getSessionTaskRunner, getStats, getTimeCreated, getTransformer, getTransport, getTransportChannel, getWarnAboutUnstartedConnectionTimeout, isAlwaysSessionAsync, isAlwaysSyncSend, isCheckForDuplicates, isClosed, isClosing, isCopyMessageOnSend, isDeleted, isDisableTimeStampsByDefault, isDispatchAsync, isDuplicate, isExclusiveConsumer, isMessagePrioritySupported, isNestedMapAndListEnabled, isNonBlockingRedelivery, isObjectMessageSerializationDefered, isOptimizeAcknowledge, isOptimizedMessageDispatch, isSendAcksAsync, isStarted, isStatsEnabled, isTransactedIndividualAck, isTransportFailed, isUseAsyncSend, isUseCompression, isUseDedicatedTaskRunner, isUseRetroactiveConsumer, isWatchTopicAdvisories, makeConnection, makeConnection, makeConnection, onAsyncException, onClientInternalException, onCommand, onConnectionControl, onConsumerControl, onControlCommand, onException, onWireFormatInfo, removeConnectionConsumer, removeDispatcher, removeDispatcher, removeInputStream, removeOutputStream, removeProducer, removeSession, removeTransportListener, rollbackDuplicate, setAlwaysSessionAsync, setAlwaysSyncSend, setAuditDepth, setAuditMaximumProducerNumber, setBlobTransferPolicy, setCheckForDuplicates, setClientID, setClientInternalExceptionListener, setCloseTimeout, setConsumerFailoverRedeliveryWaitPeriod, setCopyMessageOnSend, setDefaultClientID, setDisableTimeStampsByDefault, setDispatchAsync, setExceptionListener, setExclusiveConsumer, setMaxThreadPoolSize, setMessagePrioritySupported, setNestedMapAndListEnabled, setNonBlockingRedelivery, setObjectMessageSerializationDefered, setOptimizeAcknowledge, setOptimizeAcknowledgeTimeOut, setOptimizedAckScheduledAckInterval, setOptimizedMessageDispatch, setPassword, setPrefetchPolicy, setProducerWindowSize, setRedeliveryPolicy, setRedeliveryPolicyMap, setRejectedTaskHandler, setSendAcksAsync, setSendTimeout, setSessionTaskRunner, setStatsEnabled, setTransactedIndividualAck, setTransformer, 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, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.jms.XATopicConnection
createTopicSession
 
Methods inherited from interface javax.jms.TopicConnection
createConnectionConsumer, createDurableConnectionConsumer
 
Methods inherited from interface javax.jms.XAQueueConnection
createQueueSession
 
Methods inherited from interface javax.jms.QueueConnection
createConnectionConsumer
 
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, 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 XASession createXASession()
                          throws JMSException
Specified by:
createXASession in interface XAConnection
Throws:
JMSException

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

createSession

public Session createSession(boolean transacted,
                             int acknowledgeMode)
                      throws JMSException
Description copied from class: ActiveMQConnection
Creates a Session object.

Specified by:
createSession in interface Connection
Specified by:
createSession in interface XAConnection
Overrides:
createSession in class ActiveMQConnection
Parameters:
transacted - indicates whether the session is transacted
acknowledgeMode - 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


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.