/** * Checks whether the session uses transactions. * * @return true - if the session uses transactions. */ public boolean isTransacted() { return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction()); }
protected void doStartTransaction() throws JMSException { if (acknowledgementMode != SESSION_TRANSACTED) { // ok once the factory XaAckMode has been explicitly set to allow use outside an XA tx } else if (!getTransactionContext().isInXATransaction()) { throw new JMSException("Session's XAResource has not been enlisted in a distributed transaction."); } }
/** * Send TransactionInfo to indicate transaction has started * * @throws JMSException if some internal error occurs */ protected void doStartTransaction() throws JMSException { if (getTransacted() && !transactionContext.isInXATransaction()) { transactionContext.begin(); } }
if (isInXATransaction()) { throw new TransactionInProgressException("Cannot rollback() if an XA transaction is already in progress ");
public void close() throws JMSException { if (!closed) { if (getTransactionContext().isInXATransaction()) { if (!synchronizationRegistered) { synchronizationRegistered = true;
/** * Start a local transaction. * @throws javax.jms.JMSException on internal error */ public void begin() throws JMSException { if (isInXATransaction()) { throw new TransactionInProgressException("Cannot start local transaction. XA transaction is already in progress."); } if (transactionId == null) { synchronizations = null; beforeEndIndex = 0; setRollbackOnly(false); this.transactionId = new LocalTransactionId(getConnectionId(), localTransactionIdGenerator.getNextSequenceId()); TransactionInfo info = new TransactionInfo(getConnectionId(), transactionId, TransactionInfo.BEGIN); this.connection.ensureConnectionInfoSent(); this.connection.asyncSendPacket(info); // Notify the listener that the tx was started. if (localTransactionEventListener != null) { localTransactionEventListener.beginEvent(); } LOG.debug("Begin:{}", transactionId); } }
if (isInXATransaction()) { throw new TransactionInProgressException("Cannot commit() if an XA transaction is already in progress ");
if (getTransactionContext() != null && getTransactionContext().isInXATransaction()) { LOG.debug("Marking transaction: {} rollbackOnly", getTransactionContext()); getTransactionContext().setRollbackOnly(true);
/** * Checks whether the session uses transactions. * * @return true - if the session uses transactions. */ public boolean isTransacted() { return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction()); }
/** * Checks whether the session uses transactions. * * @return true - if the session uses transactions. */ public boolean isTransacted() { return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction()); }
/** * Checks whether the session uses transactions. * * @return true - if the session uses transactions. */ public boolean isTransacted() { return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction()); }
/** * Checks whether the session uses transactions. * * @return true - if the session uses transactions. */ public boolean isTransacted() { return this.acknowledgementMode == Session.SESSION_TRANSACTED || (transactionContext.isInXATransaction()); }
public boolean getTransacted() throws JMSException { return getTransactionContext().isInXATransaction(); }
/** * Send TransactionInfo to indicate transaction has started * * @throws JMSException if some internal error occurs */ protected void doStartTransaction() throws JMSException { if (getTransacted() && !transactionContext.isInXATransaction()) { transactionContext.begin(); } }
/** * Send TransactionInfo to indicate transaction has started * * @throws JMSException if some internal error occurs */ protected void doStartTransaction() throws JMSException { if (getTransacted() && !transactionContext.isInXATransaction()) { transactionContext.begin(); } }
/** * Send TransactionInfo to indicate transaction has started * * @throws JMSException if some internal error occurs */ protected void doStartTransaction() throws JMSException { if (getTransacted() && !transactionContext.isInXATransaction()) { transactionContext.begin(); } }
public boolean getTransacted() throws JMSException { checkClosed(); return getTransactionContext().isInXATransaction(); }
public boolean getTransacted() throws JMSException { checkClosed(); return getTransactionContext().isInXATransaction(); }
/** * Send TransactionInfo to indicate transaction has started * * @throws JMSException if some internal error occurs */ protected void doStartTransaction() throws JMSException { if (getTransacted() && !transactionContext.isInXATransaction()) { transactionContext.begin(); } }
public boolean getTransacted() throws JMSException { checkClosed(); return getTransactionContext().isInXATransaction(); }