Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.TransactionInfo


        if (!getTransacted()) {
            throw new javax.jms.IllegalStateException("Not a transacted session");
        }
        // Only send commit if the transaction was started.
        if (this.startTransaction.commit(true, false)) {
            TransactionInfo info = new TransactionInfo();
            info.setId(this.packetIdGenerator.generateId());
            info.setTransactionId(currentTransactionId);
            info.setType(TransactionInfo.COMMIT);
            //before we send, update the current transaction id
            this.currentTransactionId = null;
            // Notify the listener that the tx was commited back
            this.connection.syncSendPacket(info);
            if (localTransactionEventListener != null) {
View Full Code Here


        if (!getTransacted()) {
            throw new javax.jms.IllegalStateException("Not a transacted session");
        }
        // Only rollback commit if the transaction was started.
        if (this.startTransaction.commit(true, false)) {
            TransactionInfo info = new TransactionInfo();
            info.setId(this.packetIdGenerator.generateId());
            info.setTransactionId(currentTransactionId);
            info.setType(TransactionInfo.ROLLBACK);
            //before we send, update the current transaction id
            this.currentTransactionId = null;
            this.connection.asyncSendPacket(info);
            // Notify the listener that the tx was rolled back
            if (localTransactionEventListener != null) {
View Full Code Here

     * @throws JMSException
     */
    protected void startLocalTransaction() throws JMSException {
        if (startTransaction.commit(false, true)) {
            this.currentTransactionId = transactionIdGenerator.generateId();
            TransactionInfo info = new TransactionInfo();
            info.setId(this.packetIdGenerator.generateId());
            info.setTransactionId(currentTransactionId);
            info.setType(TransactionInfo.START);
            this.connection.asyncSendPacket(info);
            // Notify the listener that the tx was started.
            if (localTransactionEventListener != null) {
                localTransactionEventListener.beginEvent();
            }
View Full Code Here

                            XATransactionInfo info = (XATransactionInfo) packet;
                            consumeXATransactionInfo(info);
                            break;
                        }
                        case Packet.TRANSACTION_INFO : {
                            TransactionInfo info = (TransactionInfo) packet;
                            consumeTransactionInfo(info);
                            break;
                        }
                        case Packet.CONSUMER_INFO : {
                            ConsumerInfo info = (ConsumerInfo) packet;
View Full Code Here

                            XATransactionInfo info = (XATransactionInfo) packet;
                            consumeXATransactionInfo(info);
                            break;
                        }
                        case Packet.TRANSACTION_INFO : {
                            TransactionInfo info = (TransactionInfo) packet;
                            consumeTransactionInfo(info);
                            break;
                        }
                        case Packet.CONSUMER_INFO : {
                            ConsumerInfo info = (ConsumerInfo) packet;
View Full Code Here

                            XATransactionInfo info = (XATransactionInfo) packet;
                            consumeXATransactionInfo(info);
                            break;
                        }
                        case Packet.TRANSACTION_INFO : {
                            TransactionInfo info = (TransactionInfo) packet;
                            consumeTransactionInfo(info);
                            break;
                        }
                        case Packet.CONSUMER_INFO : {
                            ConsumerInfo info = (ConsumerInfo) packet;
View Full Code Here

        if (!getTransacted()) {
            throw new javax.jms.IllegalStateException("Not a transacted session");
        }
        // Only send commit if the transaction was started.
        if (this.startTransaction.commit(true, false)) {
            TransactionInfo info = new TransactionInfo();
            info.setTransactionId((String)currentTransactionId);
            info.setType(TransactionInfo.COMMIT);
            //before we send, update the current transaction id
            this.currentTransactionId = null;
            // Notify the listener that the tx was commited back
            this.connection.syncSendPacket(info);
            if (localTransactionEventListener != null) {
View Full Code Here

        if (!getTransacted()) {
            throw new javax.jms.IllegalStateException("Not a transacted session");
        }
        // Only rollback commit if the transaction was started.
        if (this.startTransaction.commit(true, false)) {
            TransactionInfo info = new TransactionInfo();
            info.setTransactionId((String)currentTransactionId);
            info.setType(TransactionInfo.ROLLBACK);
            //before we send, update the current transaction id
            this.currentTransactionId = null;
            this.connection.asyncSendPacket(info);
            // Notify the listener that the tx was rolled back
            if (localTransactionEventListener != null) {
View Full Code Here

     * @throws JMSException
     */
    protected void startLocalTransaction() throws JMSException {
        if (startTransaction.commit(false, true)) {
            this.currentTransactionId = transactionIdGenerator.generateId();
            TransactionInfo info = new TransactionInfo();
            info.setTransactionId((String)currentTransactionId);
            info.setType(TransactionInfo.START);
            this.connection.asyncSendPacket(info);
            // Notify the listener that the tx was started.
            if (localTransactionEventListener != null) {
                localTransactionEventListener.beginEvent();
            }
View Full Code Here

                            XATransactionInfo info = (XATransactionInfo) packet;
                            consumeXATransactionInfo(info);
                            break;
                        }
                        case Packet.TRANSACTION_INFO : {
                            TransactionInfo info = (TransactionInfo) packet;
                            consumeTransactionInfo(info);
                            break;
                        }
                        case Packet.CONSUMER_INFO : {
                            ConsumerInfo info = (ConsumerInfo) packet;
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.TransactionInfo

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.