Package org.apache.activemq.transaction

Examples of org.apache.activemq.transaction.Synchronization


        // This method may be invoked recursively.
        // Track original tx so that it can be restored.
        final ConnectionContext context = producerExchange.getConnectionContext();
        Transaction originalTx = context.getTransaction();
        Transaction transaction = null;
        Synchronization sync = null;
        if (message.getTransactionId() != null) {
            transaction = getTransaction(context, message.getTransactionId(), false);
            if (transaction != null) {
                sync = new Synchronization() {

                    public void afterRollback() {
                        if (audit != null) {
                            audit.rollback(message);
                        }
View Full Code Here


                inFlightTxLocations.add(location);
            } finally {
                lock.unlock();
            }
            transactionStore.addMessage(this, message, location);
            context.getTransaction().addSynchronization(new Synchronization() {
                public void afterCommit() throws Exception {
                    if (debug) {
                        LOG.debug("Transacted message add commit for: " + id + ", at: " + location);
                    }
                    lock.lock();
View Full Code Here

                inFlightTxLocations.add(location);
            } finally {
                lock.unlock();
            }
            transactionStore.removeMessage(this, ack, location);
            context.getTransaction().addSynchronization(new Synchronization() {
                public void afterCommit() throws Exception {
                    if (debug) {
                        LOG.debug("Transacted message remove commit for: " + ack.getLastMessageId() + ", at: "
                                + location);
                    }
View Full Code Here

        if( !ack.isInTransaction() ) {
            node.drop();           
            queue.dropEvent();
        } else {
            node.setAcked(true);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    node.drop();           
                    queue.dropEvent();
                }
                public void afterRollback() throws Exception {
View Full Code Here

                log.debug("Journalled transacted message add for: "+id+", at: "+location);
            synchronized( this ) {
                inFlightTxLocations.add(location);
            }
            transactionStore.addMessage(this, message, location);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    if( debug )
                        log.debug("Transacted message add commit for: "+id+", at: "+location);
                    message.decrementReferenceCount();
                    synchronized( RapidMessageStore.this ) {
View Full Code Here

                log.debug("Journalled transacted message remove for: "+ack.getLastMessageId()+", at: "+location);
            synchronized( this ) {
                inFlightTxLocations.add(location);
            }
            transactionStore.removeMessage(this, ack, location);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    if( debug )
                        log.debug("Transacted message remove commit for: "+ack.getLastMessageId()+", at: "+location);
                    synchronized( RapidMessageStore.this ) {
                        inFlightTxLocations.remove(location);
View Full Code Here

                log.debug("Journalled transacted acknowledge for: "+messageId+", at: "+location);
            synchronized(this){
                inFlightTxLocations.add(location);
            }
            transactionStore.acknowledge(this,ack,location);
            context.getTransaction().addSynchronization(new Synchronization(){

                public void afterCommit() throws Exception{
                    if(debug)
                        log.debug("Transacted acknowledge commit for: "+messageId+", at: "+location);
                    synchronized(RapidTopicMessageStore.this){
View Full Code Here

                log.debug("Journalled transacted acknowledge for: "+messageId+", at: "+location);
            synchronized (this) {
                inFlightTxLocations.add(location);
            }
            transactionStore.acknowledge(this, ack, location);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    if( debug )
                        log.debug("Transacted acknowledge commit for: "+messageId+", at: "+location);
                    synchronized (JournalTopicMessageStore.this) {
                        inFlightTxLocations.remove(location);
View Full Code Here

                log.debug("Journalled transacted acknowledge for: "+messageId+", at: "+location);
            synchronized (this) {
                inFlightTxLocations.add(location);
            }
            transactionStore.acknowledge(this, ack, location);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    if( debug )
                        log.debug("Transacted acknowledge commit for: "+messageId+", at: "+location);
                    synchronized (QuickJournalTopicMessageStore.this) {
                        inFlightTxLocations.remove(location);
View Full Code Here

                log.debug("Journalled transacted message add for: "+id+", at: "+location);
            synchronized( this ) {
                inFlightTxLocations.add(location);
            }
            transactionStore.addMessage(this, message, location);
            context.getTransaction().addSynchronization(new Synchronization(){
                public void afterCommit() throws Exception {                   
                    if( debug )
                        log.debug("Transacted message add commit for: "+id+", at: "+location);
                    message.decrementReferenceCount();
                    synchronized( QuickJournalMessageStore.this ) {
View Full Code Here

TOP

Related Classes of org.apache.activemq.transaction.Synchronization

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.