Examples of addPostCommitTask()


Examples of org.activemq.service.Transaction.addPostCommitTask()

                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            JournalAck ack = new JournalAck(destinationName,subscription,messageIdentity.getMessageID(), tx.getTransactionId());
            transactionStore.acknowledge(this, ack, location);
            tx.addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    if( debug )
                        log.debug("In flight acknowledge commit: "+messageIdentity.getMessageID()+" at "+location);
                   
                    synchronized (JournalTopicMessageStore.this) {
View Full Code Here

Examples of org.activemq.service.Transaction.addPostCommitTask()

            synchronized (this) {
                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            transactionStore.addMessage(this, message, location);
            tx.addPostCommitTask(new TransactionTask() {
                public void execute() throws Throwable {
                    synchronized (JournalMessageStore.this) {
                        inFlightTxLocations.remove(location);
                        addMessage(message, location);
                    }
View Full Code Here

Examples of org.activemq.service.Transaction.addPostCommitTask()

            synchronized( this ) {
                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            transactionStore.removeMessage(this, ack, location);
            tx.addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    synchronized (JournalMessageStore.this) {
                        inFlightTxLocations.remove(location);
                        removeMessage(ack, location);
                    }
View Full Code Here

Examples of org.activemq.service.Transaction.addPostCommitTask()

                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            JournalAck ack = new JournalAck(destinationName,subscription,messageIdentity.getMessageID(), tx.getTransactionId());
            transactionStore.acknowledge(this, ack, location);
            tx.addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    synchronized (JournalTopicMessageStore.this) {
                        inFlightTxLocations.remove(location);
                        acknowledge(subscription, messageIdentity, location);
                    }
View Full Code Here

Examples of org.activemq.service.Transaction.addPostCommitTask()

            synchronized (this) {
                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            transactionStore.addMessage(this, message, location);
            tx.addPostCommitTask(new TransactionTask() {
                public void execute() throws Throwable {
                    if( debug )
                        log.debug("In flight message add commit: "+message.getJMSMessageID()+" at "+location);                       
                    synchronized (JournalMessageStore.this) {
                        inFlightTxLocations.remove(location);
View Full Code Here

Examples of org.activemq.service.Transaction.addPostCommitTask()

            synchronized( this ) {
                inFlightTxLocations.add(location);
            }
            final Transaction tx = TransactionManager.getContexTransaction();
            transactionStore.removeMessage(this, ack, location);
            tx.addPostCommitTask(new TransactionTask(){
                public void execute() throws Throwable {
                    if( debug )
                        log.debug("In flight message remove commit: "+ack.getMessageID()+" at "+location);

                    synchronized (JournalMessageStore.this) {                       
View Full Code Here

Examples of org.codehaus.activemq.service.Transaction.addPostCommitTask()

        }
        else {
            transaction = transactionManager.getLocalTransaction(transactionId);
        }

        transaction.addPostCommitTask(new SendMessageTransactionTask(client, message));
    }


    /**
     * Acknowledge consumption of a message by the Message Consumer
View Full Code Here

Examples of org.codehaus.activemq.service.Transaction.addPostCommitTask()

            }
        }
        else {
            transaction = transactionManager.getLocalTransaction(transactionId);
        }
        transaction.addPostCommitTask(new MessageAckTransactionTask(client, ack));
        transaction.addPostRollbackTask(new RedeliverMessageTransactionTask(client, ack));

        // we need to tell the dispatcher that we can now accept another message
        // even though we don't really ack the message until the commit
        // this is because if we have a prefetch value of 1, we can never consume 2 messages
View Full Code Here

Examples of org.codehaus.activemq.service.Transaction.addPostCommitTask()

            }
        }
        else {
            transaction = transactionManager.getLocalTransaction(transactionId);
        }
        transaction.addPostCommitTask(new MessageAckTransactionTask(client, ack));
        transaction.addPostRollbackTask(new RedeliverMessageTransactionTask(client, ack));

        // we need to tell the dispatcher that we can now accept another message
        // even though we don't really ack the message until the commit
        // this is because if we have a prefetch value of 1, we can never consume 2 messages
View Full Code Here

Examples of org.codehaus.activemq.service.Transaction.addPostCommitTask()

        }
        else {
            transaction = transactionManager.getLocalTransaction(transactionId);
        }

        transaction.addPostCommitTask(new SendMessageTransactionTask(client, message));
    }

    /**
     * Add an active message consumer
     *
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.