Package org.codehaus.activemq.message

Examples of org.codehaus.activemq.message.ResponseReceipt


        else if (info.getType() == XATransactionInfo.XA_RECOVER) {
            ActiveMQXid rc[] = this.brokerConnector.getPreparedTransactions(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.GET_RM_ID) {
            String rc = this.brokerConnector.getResourceManagerId(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.END) {
            // we don't do anything..
        }
        else {
            if (info.getType() == XATransactionInfo.PRE_COMMIT) {
                int rc = this.brokerConnector.prepareTransaction(this, info.getXid());
                // We will be sending our own receipt..
                info.setReceiptRequired(false);
                // Send the receipt..
                IntResponseReceipt receipt = new IntResponseReceipt();
                receipt.setId(this.packetIdGenerator.generateId());
                receipt.setCorrelationId(info.getId());
                receipt.setResult(rc);
                send(receipt);
            }
            else if (info.getType() == XATransactionInfo.ROLLBACK) {
                this.brokerConnector.rollbackTransaction(this, info.getXid());
            }
View Full Code Here


        else if (info.getType() == XATransactionInfo.XA_RECOVER) {
            ActiveMQXid rc[] = this.brokerConnector.getPreparedTransactions(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.GET_RM_ID) {
            String rc = this.brokerConnector.getResourceManagerId(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.END) {
            // we don't do anything..
        }
        else {
            if (info.getType() == XATransactionInfo.PRE_COMMIT) {
                int rc = this.brokerConnector.prepareTransaction(this, info.getXid());
                // We will be sending our own receipt..
                info.setReceiptRequired(false);
                // Send the receipt..
                IntResponseReceipt receipt = new IntResponseReceipt();
                receipt.setId(this.packetIdGenerator.generateId());
                receipt.setCorrelationId(info.getId());
                receipt.setResult(rc);
                send(receipt);
            }
            else if (info.getType() == XATransactionInfo.ROLLBACK) {
                this.brokerConnector.rollbackTransaction(this, info.getXid());
            }
View Full Code Here

        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

        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) {
            throw toXAException(e);
        }
    }
View Full Code Here

        else if (info.getType() == XATransactionInfo.XA_RECOVER) {
            ActiveMQXid rc[] = this.brokerConnector.getPreparedTransactions(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.GET_RM_ID) {
            String rc = this.brokerConnector.getResourceManagerId(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.generateId());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.END) {
            // we don't do anything..
        }
        else {
            if (info.getType() == XATransactionInfo.PRE_COMMIT) {
                int rc = this.brokerConnector.prepareTransaction(this, info.getXid());
                // We will be sending our own receipt..
                info.setReceiptRequired(false);
                // Send the receipt..
                IntResponseReceipt receipt = new IntResponseReceipt();
                receipt.setId(this.packetIdGenerator.generateId());
                receipt.setCorrelationId(info.getId());
                receipt.setResult(rc);
                send(receipt);
            }
            else if (info.getType() == XATransactionInfo.ROLLBACK) {
                this.brokerConnector.rollbackTransaction(this, info.getXid());
            }
View Full Code Here

        XATransactionInfo info = new XATransactionInfo();
        info.setType(XATransactionInfo.XA_RECOVER);

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

        else if (info.getType() == XATransactionInfo.XA_RECOVER) {
            ActiveMQXid rc[] = this.brokerConnector.getPreparedTransactions(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.GET_RM_ID) {
            String rc = this.brokerConnector.getResourceManagerId(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.getNextShortSequence());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.END) {
            // we don't do anything..
        }
        else {
            if (info.getType() == XATransactionInfo.PRE_COMMIT) {
                int rc = this.brokerConnector.prepareTransaction(this, info.getXid());
                // We will be sending our own receipt..
                info.setReceiptRequired(false);
                // Send the receipt..
                IntResponseReceipt receipt = new IntResponseReceipt();
                receipt.setId(this.packetIdGenerator.getNextShortSequence());
                receipt.setCorrelationId(info.getId());
                receipt.setResult(rc);
                send(receipt);
            }
            else if (info.getType() == XATransactionInfo.ROLLBACK) {
                this.brokerConnector.rollbackTransaction(this, info.getXid());
            }
View Full Code Here

        XATransactionInfo info = new XATransactionInfo();
        info.setType(XATransactionInfo.XA_RECOVER);

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

    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

        else if (info.getType() == XATransactionInfo.XA_RECOVER) {
            ActiveMQXid rc[] = this.brokerConnector.getPreparedTransactions(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.GET_RM_ID) {
            String rc = this.brokerConnector.getResourceManagerId(this);
            // We will be sending our own receipt..
            info.setReceiptRequired(false);
            // Send the receipt..
            ResponseReceipt receipt = new ResponseReceipt();
            receipt.setId(this.packetIdGenerator.getNextShortSequence());
            receipt.setCorrelationId(info.getId());
            receipt.setResult(rc);
            send(receipt);
        }
        else if (info.getType() == XATransactionInfo.END) {
            // we don't do anything..
        }
        else {
            if (info.getType() == XATransactionInfo.PRE_COMMIT) {
                int rc = this.brokerConnector.prepareTransaction(this, info.getXid());
                // We will be sending our own receipt..
                info.setReceiptRequired(false);
                // Send the receipt..
                IntResponseReceipt receipt = new IntResponseReceipt();
                receipt.setId(this.packetIdGenerator.getNextShortSequence());
                receipt.setCorrelationId(info.getId());
                receipt.setResult(rc);
                send(receipt);
            }
            else if (info.getType() == XATransactionInfo.ROLLBACK) {
                this.brokerConnector.rollbackTransaction(this, info.getXid());
            }
View Full Code Here

TOP

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

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.