Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » [javadoc | source]
org.apache.activemq
public class: ActiveMQXASession [javadoc | source]
java.lang.Object
   org.apache.activemq.ActiveMQSession
      org.apache.activemq.ActiveMQXASession

All Implemented Interfaces:
    javax.jms.XATopicSession, javax.jms.TopicSession, javax.jms.XAQueueSession, javax.jms.QueueSession, StatsCapable, ActiveMQDispatcher, javax.jms.Session

The XASession interface extends the capability of Session by adding access to a JMS provider's support for the Java Transaction API (JTA) (optional). This support takes the form of a javax.transaction.xa.XAResource object. The functionality of this object closely resembles that defined by the standard X/Open XA Resource interface.

An application server controls the transactional assignment of an XASession by obtaining its XAResource. It uses the XAResource to assign the session to a transaction, prepare and commit work on the transaction, and so on.

An XAResource provides some fairly sophisticated facilities for interleaving work on multiple transactions, recovering a list of transactions in progress, and so on. A JTA aware JMS provider must fully implement this functionality. This could be done by using the services of a database that supports XA, or a JMS provider may choose to implement this functionality from scratch.

A client of the application server is given what it thinks is a regular JMS Session. Behind the scenes, the application server controls the transaction management of the underlying XASession.

The XASession 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.

Fields inherited from org.apache.activemq.ActiveMQSession:
INDIVIDUAL_ACKNOWLEDGE,  MAX_ACK_CONSTANT,  scheduler,  acknowledgementMode,  connection,  info,  consumerIdGenerator,  producerIdGenerator,  deliveryIdGenerator,  executor,  started,  consumers,  producers,  closed,  asyncDispatch,  sessionAsyncDispatch,  debug,  sendMutex
Constructor:
 public ActiveMQXASession(ActiveMQXAConnection connection,
    SessionId sessionId,
    int theAcknowlegeMode,
    boolean dispatchAsync) throws JMSException 
Method from org.apache.activemq.ActiveMQXASession Summary:
commit,   doStartTransaction,   getQueueSession,   getSession,   getTopicSession,   getTransacted,   getXAResource,   rollback
Methods from org.apache.activemq.ActiveMQSession:
acknowledge,   addConsumer,   addProducer,   asyncSendPacket,   checkClosed,   checkMessageListener,   clearMessagesInProgress,   close,   close,   commit,   configureMessage,   createBlobMessage,   createBlobMessage,   createBlobMessage,   createBlobMessage,   createBrowser,   createBrowser,   createBytesMessage,   createConsumer,   createConsumer,   createConsumer,   createConsumer,   createConsumer,   createConsumer,   createDurableSubscriber,   createDurableSubscriber,   createMapMessage,   createMessage,   createObjectMessage,   createObjectMessage,   createProducer,   createPublisher,   createQueue,   createReceiver,   createReceiver,   createSender,   createStreamMessage,   createSubscriber,   createSubscriber,   createTemporaryQueue,   createTemporaryTopic,   createTextMessage,   createTextMessage,   createTopic,   deliverAcks,   dispatch,   dispose,   doStartTransaction,   getAcknowledgeMode,   getBlobTransferPolicy,   getConnection,   getDeliveryListener,   getLastDeliveredSequenceId,   getMessageListener,   getNextConsumerId,   getNextDeliveryId,   getNextProducerId,   getSessionId,   getSessionInfo,   getSessionStats,   getStats,   getTransacted,   getTransactionContext,   getTransformer,   getUnconsumedMessages,   hasUncomsumedMessages,   isAsyncDispatch,   isAutoAcknowledge,   isClientAcknowledge,   isDupsOkAcknowledge,   isInUse,   isIndividualAcknowledge,   isRunning,   isSessionAsyncDispatch,   isTransacted,   recover,   redispatch,   removeConsumer,   removeProducer,   rollback,   run,   send,   sendAck,   sendAck,   setAsyncDispatch,   setBlobTransferPolicy,   setDeliveryListener,   setMessageListener,   setOptimizeAcknowledge,   setPrefetchSize,   setSessionAsyncDispatch,   setTransactionContext,   setTransformer,   start,   stop,   syncSendPacket,   toString,   unsubscribe
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.activemq.ActiveMQXASession Detail:
 public  void commit() throws JMSException 
 protected  void doStartTransaction() throws JMSException 
    This is called before transacted work is done by the session. XA Work can only be done when this XA resource is associated with an Xid.
 public QueueSession getQueueSession() throws JMSException 
 public Session getSession() throws JMSException 
 public TopicSession getTopicSession() throws JMSException 
 public boolean getTransacted() throws JMSException 
 public XAResource getXAResource() 
 public  void rollback() throws JMSException