Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ActiveMQXid


    public void rollback(Xid xid) throws XAException {

        // We allow interleaving multiple transactions, so
        // we don't limit rollback to the associated xid.
        ActiveMQXid x;
        if (ActiveMQXid.equals(associatedXid,xid)) {
            //I think this can happen even without an end(xid) call.  Need to check spec.
            x = activeXid;
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
View Full Code Here


    public void commit(Xid xid, boolean onePhase) throws XAException {
        checkClosedXA();

        // We allow interleaving multiple transactions, so
        // we don't limit commit to the associated xid.
        ActiveMQXid x;
        if (ActiveMQXid.equals(associatedXid,xid)) {
            //should never happen, end(xid,TMSUCCESS) must have been previously called
//            x = activeXid;
            throw new XAException(XAException.XAER_PROTO);
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
View Full Code Here

    public void forget(Xid xid) throws XAException {
        checkClosedXA();

        // We allow interleaving multiple transactions, so
        // we don't limit forget to the associated xid.
        ActiveMQXid x;
        if (ActiveMQXid.equals(associatedXid,xid)) {
            //TODO determine if this can happen... I think not.
            x = activeXid;
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
View Full Code Here

    private void setXid(Xid xid) {
        if (xid != null) {
// associate
            associatedXid = xid;
            activeXid = new ActiveMQXid(xid);
            super.currentTransactionId = activeXid.toLocalTransactionId();
        } else {
// dis-associate
            associatedXid = null;
            activeXid = null;
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.ActiveMQXid

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.