Examples of KahaCommitCommand


Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

                    if (postCommit != null) {
                        postCommit.run();
                    }
                    if (doneSomething) {
                        KahaTransactionInfo info = getTransactionInfo(txid);
                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
                    }
                }else {
                    //The Tx will be null for failed over clients - lets run their post commits
                    if (postCommit != null) {
                        postCommit.run();
                    }
                }

            } else {
                KahaTransactionInfo info = getTransactionInfo(txid);
                // ensure message order w.r.t to cursor and store for setBatch()
                synchronized (this) {
                    theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
                }
            }
        }else {
           LOG.error("Null transaction passed on commit");
        }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

    public void persistOutcome(Tx tx, TransactionId txid) throws IOException {
        tx.trackPrepareLocation(store(new KahaPrepareCommand().setTransactionInfo(multiKahaDBPersistenceAdapter.transactionIdTransformer.transform(txid))));
    }

    public void persistCompletion(TransactionId txid) throws IOException {
        store(new KahaCommitCommand().setTransactionInfo(multiKahaDBPersistenceAdapter.transactionIdTransformer.transform(txid)));
    }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

            case KAHA_PREPARE_COMMAND:
                KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command;
                getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo()));
                break;
            case KAHA_COMMIT_COMMAND:
                KahaCommitCommand commitCommand = (KahaCommitCommand) command;
                removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo()));
                break;
            case KAHA_TRACE_COMMAND:
                break;
            default:
                throw new IOException("Unexpected command in transaction journal: " + command);
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

                    if (postCommit != null) {
                        postCommit.run();
                    }
                    if (doneSomething) {
                        KahaTransactionInfo info = getTransactionInfo(txid);
                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
                    }
                }else {
                    //The Tx will be null for failed over clients - lets run their post commits
                    if (postCommit != null) {
                        postCommit.run();
                    }
                }

            } else {
                KahaTransactionInfo info = getTransactionInfo(txid);
                // ensure message order w.r.t to cursor and store for setBatch()
                synchronized (this) {
                    theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
                }
            }
        }else {
           LOG.error("Null transaction passed on commit");
        }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

                    if (postCommit != null) {
                        postCommit.run();
                    }
                    if (doneSomething) {
                        KahaTransactionInfo info = getTransactionInfo(txid);
                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
                    }
                }else {
                    //The Tx will be null for failed over clients - lets run their post commits
                    if (postCommit != null) {
                        postCommit.run();
                    }
                }

            } else {
                KahaTransactionInfo info = getTransactionInfo(txid);
                // ensure message order w.r.t to cursor and store for setBatch()
                synchronized (this) {
                    theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
                }
            }
        }else {
           LOG.error("Null transaction passed on commit");
        }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

    public TransactionStore createTransactionStore() throws IOException {
        return new TransactionStore(){
           
            public void commit(TransactionId txid, boolean wasPrepared) throws IOException {
                store(new KahaCommitCommand().setTransactionInfo(createTransactionInfo(txid)), true);
            }
            public void prepare(TransactionId txid) throws IOException {
                store(new KahaPrepareCommand().setTransactionInfo(createTransactionInfo(txid)), true);
            }
            public void rollback(TransactionId txid) throws IOException {
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

                    if (postCommit != null) {
                        postCommit.run();
                    }
                    if (doneSomething) {
                        KahaTransactionInfo info = getTransactionInfo(txid);
                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
                    }
                }else {
                    //The Tx will be null for failed over clients - lets run their post commits
                    if (postCommit != null) {
                        postCommit.run();
                    }
                }

            } else {
                KahaTransactionInfo info = getTransactionInfo(txid);
                theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
                forgetRecoveredAcks(txid);
            }
        }else {
           LOG.error("Null transaction passed on commit");
        }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

    public void persistOutcome(Tx tx, TransactionId txid) throws IOException {
        tx.trackPrepareLocation(store(new KahaPrepareCommand().setTransactionInfo(multiKahaDBPersistenceAdapter.transactionIdTransformer.transform(txid))));
    }

    public void persistCompletion(TransactionId txid) throws IOException {
        store(new KahaCommitCommand().setTransactionInfo(multiKahaDBPersistenceAdapter.transactionIdTransformer.transform(txid)));
    }
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

            case KAHA_PREPARE_COMMAND:
                KahaPrepareCommand prepareCommand = (KahaPrepareCommand) command;
                getTx(TransactionIdConversion.convert(prepareCommand.getTransactionInfo()));
                break;
            case KAHA_COMMIT_COMMAND:
                KahaCommitCommand commitCommand = (KahaCommitCommand) command;
                removeTx(TransactionIdConversion.convert(commitCommand.getTransactionInfo()));
                break;
            case KAHA_TRACE_COMMAND:
                break;
            default:
                throw new IOException("Unexpected command in transaction journal: " + command);
View Full Code Here

Examples of org.apache.activemq.store.kahadb.data.KahaCommitCommand

                    if (postCommit != null) {
                        postCommit.run();
                    }
                    if (doneSomething) {
                        KahaTransactionInfo info = getTransactionInfo(txid);
                        theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, null, null);
                    }
                }else {
                    //The Tx will be null for failed over clients - lets run their post commits
                    if (postCommit != null) {
                        postCommit.run();
                    }
                }

            } else {
                KahaTransactionInfo info = getTransactionInfo(txid);
                theStore.store(new KahaCommitCommand().setTransactionInfo(info), true, preCommit, postCommit);
                forgetRecoveredAcks(txid);
            }
        }else {
           LOG.error("Null transaction passed on commit");
        }
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.