Package com.taobao.metamorphosis.transaction

Examples of com.taobao.metamorphosis.transaction.XATransactionId


    public int prepare(final Xid xid) throws XAException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Prepare: " + xid);
        }

        XATransactionId x;

        // �����ϲ�Ӧ�ó��������������Ϊend������prepare֮ǰ���ã�associatedXid�Ѿ�����Ϊnull��Ԥ��
        if (xid == null || this.equals(this.associatedXid, xid)) {
            throw new XAException(XAException.XAER_PROTO);
        }
        else {
            x = new XATransactionId(xid, this.uniqueQualifier);
        }
        MetaStatLog.addStat(null, StatConstants.TX_PREPARE);

        final TransactionInfo info =
                new TransactionInfo(x, this.sessionId, TransactionInfo.TransactionType.PREPARE, this.uniqueQualifier);
View Full Code Here


                        continue;
                    }
                    final String[] xidStrs = NEW_LINE_PATTERN.split(data);
                    for (final String key : xidStrs) {
                        if (!StringUtils.isBlank(key)) {
                            xidList.add(new XATransactionId(key));
                        }
                    }
                }
                catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
View Full Code Here

    public void rollback(final Xid xid) throws XAException {
        if (LOG.isDebugEnabled()) {
            LOG.debug("Rollback: " + xid);
        }

        XATransactionId x;
        if (xid == null) {
            throw new XAException(XAException.XAER_PROTO);
        }
        if (this.equals(this.associatedXid, xid)) {
            x = (XATransactionId) this.transactionId;
        }
        else {
            x = new XATransactionId(xid, this.uniqueQualifier);
        }
        MetaStatLog.addStat(null, StatConstants.TX_ROLLBACK);
        this.checkConnectionConnected();
        try {
View Full Code Here


    private void startXATransaction(final Xid xid) throws XAException {
        MetaStatLog.addStat(null, StatConstants.TX_BEGIN);
        this.associatedXid = xid;
        this.transactionId = new XATransactionId(xid, this.uniqueQualifier);

        final TransactionInfo info =
                new TransactionInfo(this.transactionId, this.sessionId, TransactionInfo.TransactionType.BEGIN,
                    this.uniqueQualifier, this.transactionTimeout);
        this.syncSendXATxCommand(info);
View Full Code Here

TOP

Related Classes of com.taobao.metamorphosis.transaction.XATransactionId

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.