Examples of XATransactionInfo


Examples of org.codehaus.activemq.message.XATransactionInfo

    /**
     * Get's the resource manager id.
     */
    private String determineResourceManagerId() throws JMSException {

        XATransactionInfo info = new XATransactionInfo();
        info.setType(TransactionInfo.GET_RM_ID);

        ResponseReceipt receipt = (ResponseReceipt) syncSendRequest(info);
        String rmId = (String) receipt.getResult();
        assert rmId != null;
        return rmId;
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

                            MessageAck ack = (MessageAck) packet;
                            consumeMessageAck(ack);
                            break;
                        }
                        case Packet.XA_TRANSACTION_INFO : {
                            XATransactionInfo info = (XATransactionInfo) packet;
                            consumeXATransactionInfo(info);
                            break;
                        }
                        case Packet.TRANSACTION_INFO : {
                            TransactionInfo info = (TransactionInfo) packet;
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

    /**
     * Get's the resource manager id.
     */
    private String determineResourceManagerId() throws JMSException {

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setType(TransactionInfo.GET_RM_ID);

        ResponseReceipt receipt = (ResponseReceipt) syncSendRequest(info);
        String rmId = (String) receipt.getResult();
        assert rmId != null;
        return rmId;
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

        }

        // associate
        setXid(xid);

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(activeXid);
        info.setType(XATransactionInfo.START);

        try {
            // TODO: we may want to wait for reply..
            // server could fail this request
            this.connection.syncSendPacket(info);
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

        } else {
            //TODO cache the known xids so we don't keep recreating this one??
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
        info.setType(XATransactionInfo.PRE_COMMIT);

        try {
// Find out if the server wants to commit or rollback.
            IntResponseReceipt receipt = (IntResponseReceipt) this.connection.syncSendRequest(info);
            return receipt.getResult();
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

            x = activeXid;
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
        info.setType(XATransactionInfo.ROLLBACK);

        try {
            // Let the server know that the tx is rollback.
            this.connection.syncSendPacket(info);
        } catch (JMSException e) {
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

            throw new XAException(XAException.XAER_PROTO);
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
        info.setType(onePhase ? XATransactionInfo.COMMIT_ONE_PHASE : XATransactionInfo.COMMIT);

        try {
            // Notify the server that the tx was commited back
            this.connection.syncSendPacket(info);
        } catch (JMSException e) {
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo

            x = activeXid;
        } else {
            x = new ActiveMQXid(xid);
        }

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setXid(x);
        info.setType(XATransactionInfo.FORGET);

        try {
            // Tell the server to forget the transaction.
            this.connection.syncSendPacket(info);
        } catch (JMSException e) {
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo


    public Xid[] recover(int flag) throws XAException {
        checkClosedXA();

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setType(XATransactionInfo.XA_RECOVER);

        try {
            ResponseReceipt receipt = (ResponseReceipt) this.connection.syncSendRequest(info);
            return (ActiveMQXid[]) receipt.getResult();
        } catch (JMSException e) {
View Full Code Here

Examples of org.codehaus.activemq.message.XATransactionInfo


    public int getTransactionTimeout() throws XAException {
        checkClosedXA();

        XATransactionInfo info = new XATransactionInfo();
        info.setId(this.packetIdGenerator.generateId());
        info.setType(XATransactionInfo.GET_TX_TIMEOUT);

        try {
            // get the tx timeout that was set.
            IntResponseReceipt receipt = (IntResponseReceipt) this.connection.syncSendRequest(info);
            return receipt.getResult();
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.