Package com.taobao.metamorphosis.server.transaction

Examples of com.taobao.metamorphosis.server.transaction.XATransaction


    public TransactionId[] getPreparedTransactions(final SessionContext context, final String uniqueQualifier)
            throws Exception {
        final List<TransactionId> txs = new ArrayList<TransactionId>();
        synchronized (this.xaTransactions) {
            for (final Iterator<XATransaction> iter = this.xaTransactions.values().iterator(); iter.hasNext();) {
                final XATransaction tx = iter.next();
                // Only tx that the unique qualifier is equals to the request
                // one.
                if (tx.isPrepared() && this.isValidTx(uniqueQualifier, tx)) {
                    if (LOG.isDebugEnabled()) {
                        LOG.debug("prepared transaction: " + tx.getTransactionId());
                    }
                    txs.add(tx.getTransactionId());
                }
            }
        }
        synchronized (this.xaHeuristicTransactions) {
            // �ֹ���������񣬶���prepare״̬��xa����
            for (final Iterator<XATransaction> iter = this.xaHeuristicTransactions.values().iterator(); iter.hasNext();) {
                final XATransaction tx = iter.next();
                // Only tx that the unique qualifier is equals to the request
                // one.
                if (this.isValidTx(uniqueQualifier, tx)) {
                    txs.add(tx.getTransactionId());
                }
            }
        }
        final XATransactionId rc[] = new XATransactionId[txs.size()];
        txs.toArray(rc);
View Full Code Here


            synchronized (this.xaTransactions) {
                transaction = this.xaTransactions.get(xid);
                if (transaction != null) {
                    return;
                }
                transaction = new XATransaction(this, this.transactionStore, (XATransactionId) xid);
                this.xaTransactions.put(xid, (XATransaction) transaction);
            }
        }
        else {
            this.statsManager.statsTxBegin(false, 1);
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.server.transaction.XATransaction

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.