public class ActiveMQXASession extends ActiveMQSession implements QueueSession, TopicSession, XAQueueSession, XATopicSession
Session
,
QueueSession
,
TopicSession
,
XASession
ActiveMQSession.DeliveryListener
acknowledgementMode, asyncDispatch, closed, connection, consumerIdGenerator, consumers, debug, deliveryIdGenerator, executor, INDIVIDUAL_ACKNOWLEDGE, info, MAX_ACK_CONSTANT, producerIdGenerator, producers, redeliveryGuard, sendMutex, sessionAsyncDispatch, started
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
Constructor and Description |
---|
ActiveMQXASession(ActiveMQXAConnection connection,
SessionId sessionId,
int theAcknowlegeMode,
boolean dispatchAsync) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commits all messages done in this transaction and releases any locks
currently held.
|
protected void |
doStartTransaction()
Send TransactionInfo to indicate transaction has started
|
QueueSession |
getQueueSession() |
Session |
getSession() |
TopicSession |
getTopicSession() |
boolean |
getTransacted()
Indicates whether the session is in transacted mode.
|
XAResource |
getXAResource() |
boolean |
isAutoAcknowledge()
Checks whether the session used auto acknowledgment.
|
void |
rollback()
Rolls back any messages done in this transaction and releases any locks
currently held.
|
acknowledge, addConsumer, addProducer, asyncSendPacket, checkClosed, checkMessageListener, close, close, 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, dispatch, dispose, getAcknowledgeMode, getBlobTransferPolicy, getConnection, getConnectionExecutor, getDeliveryListener, getLastDeliveredSequenceId, getMessageListener, getNextConsumerId, getNextDeliveryId, getNextProducerId, getScheduler, getSessionId, getSessionInfo, getSessionStats, getStats, getTransactionContext, getTransformer, getUnconsumedMessages, hasUncomsumedMessages, isAsyncDispatch, isClientAcknowledge, isClosed, isDupsOkAcknowledge, isIndividualAcknowledge, isInUse, isRunning, isSessionAsyncDispatch, isTransacted, recover, redispatch, removeConsumer, removeProducer, run, send, sendAck, sendAck, setAsyncDispatch, setBlobTransferPolicy, setDeliveryListener, setMessageListener, setOptimizeAcknowledge, setPrefetchSize, setSessionAsyncDispatch, setTransactionContext, setTransformer, start, stop, syncSendPacket, toString, unsubscribe
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createBrowser, createBrowser, createQueue, createReceiver, createReceiver, createSender, createTemporaryQueue
createDurableSubscriber, createDurableSubscriber, createPublisher, createSubscriber, createSubscriber, createTemporaryTopic, createTopic, unsubscribe
close, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, recover, run, setMessageListener
public ActiveMQXASession(ActiveMQXAConnection connection, SessionId sessionId, int theAcknowlegeMode, boolean dispatchAsync) throws JMSException
JMSException
public boolean getTransacted() throws JMSException
ActiveMQSession
getTransacted
in interface Session
getTransacted
in interface XASession
getTransacted
in class ActiveMQSession
JMSException
- if there is some internal error.public void rollback() throws JMSException
ActiveMQSession
rollback
in interface Session
rollback
in interface XASession
rollback
in class ActiveMQSession
JMSException
- if the JMS provider fails to roll back the
transaction due to some internal error.IllegalStateException
- if the method is not called by a
transacted session.public void commit() throws JMSException
ActiveMQSession
commit
in interface Session
commit
in interface XASession
commit
in class ActiveMQSession
JMSException
- if the JMS provider fails to commit the transaction
due to some internal error.TransactionRolledBackException
- if the transaction is rolled back
due to some internal error during commit.IllegalStateException
- if the method is not called by a
transacted session.public Session getSession() throws JMSException
getSession
in interface XASession
JMSException
public XAResource getXAResource()
getXAResource
in interface XASession
public QueueSession getQueueSession() throws JMSException
getQueueSession
in interface XAQueueSession
JMSException
public TopicSession getTopicSession() throws JMSException
getTopicSession
in interface XATopicSession
JMSException
public boolean isAutoAcknowledge()
ActiveMQSession
isAutoAcknowledge
in class ActiveMQSession
protected void doStartTransaction() throws JMSException
ActiveMQSession
doStartTransaction
in class ActiveMQSession
JMSException
- if some internal error occursCopyright © 2005–2017 The Apache Software Foundation. All rights reserved.