Package org.activemq.service

Examples of org.activemq.service.Transaction


        transactionManager.createLocalTransaction(client, transactionId);
    }

    public void commitTransaction(BrokerClient client, String transactionId) throws JMSException {
        try {
            Transaction transaction = transactionManager.getLocalTransaction(transactionId);
            transaction.commit(true);
        }
        catch (XAException e) {
            // TODO: I think the XAException should propagate all the way to the client.
            throw (JMSException) new JMSException(e.getMessage()).initCause(e);
        }
View Full Code Here


    /**
     * rollback a transaction
     */
    public void rollbackTransaction(BrokerClient client, String transactionId) throws JMSException {
        try {
            Transaction transaction = transactionManager.getLocalTransaction(transactionId);
            transaction.rollback();
        }
        catch (XAException e) {
            // TODO: I think the XAException should propagate all the way to the client.
            throw (JMSException) new JMSException(e.getMessage()).initCause(e);
        }
View Full Code Here

     * Prepares an XA Transaciton.
     *
     * @see org.activemq.broker.Broker#prepareTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
     */
    public int prepareTransaction(BrokerClient client, ActiveMQXid xid) throws XAException {
        Transaction transaction = transactionManager.getXATransaction(xid);
        return transaction.prepare();
    }
View Full Code Here

     * Rollback an XA Transaction.
     *
     * @see org.activemq.broker.Broker#rollbackTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid)
     */
    public void rollbackTransaction(BrokerClient client, ActiveMQXid xid) throws XAException {
        Transaction transaction = transactionManager.getXATransaction(xid);
        transaction.rollback();
    }
View Full Code Here

     * Commit an XA Transaction.
     *
     * @see org.activemq.broker.Broker#commitTransaction(org.activemq.broker.BrokerClient, org.activemq.message.ActiveMQXid, boolean)
     */
    public void commitTransaction(BrokerClient client, ActiveMQXid xid, boolean onePhase) throws XAException {
        Transaction transaction = transactionManager.getXATransaction(xid);
        transaction.commit(onePhase);
    }
View Full Code Here

     * the Transactio ncan be obtained via TransactionManager.getContexTransaction().
     * @param message
     * @throws JMSException
     */
    private final void associateTransaction(ActiveMQMessage message) throws JMSException {
        Transaction transaction;
        if( message.isPartOfTransaction() ) {
            if (message.isXaTransacted()) {
                try {
                    transaction = transactionManager.getXATransaction((ActiveMQXid) message.getTransactionId());
                }
View Full Code Here

     * the Transactio ncan be obtained via TransactionManager.getContexTransaction().
     * @param ack
     * @throws JMSException
     */
    private void associateTransaction(MessageAck ack) throws JMSException {
        Transaction transaction;
        if( ack.isPartOfTransaction() ) {
            if (ack.isXaTransacted()) {
                try {
                    transaction = transactionManager.getXATransaction((ActiveMQXid) ack.getTransactionId());
                }
View Full Code Here

TOP

Related Classes of org.activemq.service.Transaction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.