Package org.activemq.message

Examples of org.activemq.message.ActiveMQXid


     * @see org.activemq.service.TransactionManager#getPreparedXATransactions()
     */
    public ActiveMQXid[] getPreparedXATransactions() throws XAException {
        ArrayList txs = new ArrayList(xaTxs.size());
        for (Iterator iter = xaTxs.keySet().iterator(); iter.hasNext();) {
            ActiveMQXid tx = (ActiveMQXid) iter.next();
            txs.add(tx);
        }
        ActiveMQXid rc[] = new ActiveMQXid[txs.size()];
        txs.toArray(rc);
        return rc;
    }
View Full Code Here


    private void consumeXATransactionInfo(XATransactionInfo info) throws JMSException, XAException {
        if (info.getType() == XATransactionInfo.START) {
            this.brokerConnector.startTransaction(this, info.getXid());
        }
        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());
View Full Code Here

              case TxCommand.LOCAL_COMMIT:
              case TxCommand.LOCAL_ROLLBACK:
                  os.writeUTF( (String) command.getTransactionId() );
                  break;
              default:
                  ActiveMQXid xid = (ActiveMQXid) command.getTransactionId();
                xid.write(os);
                break;
            }
            os.close();
            return journal.write(pos.getPacket(), sync);
        }
View Full Code Here

        if (ack.isPartOfTransaction()) {
            if (cachingEnabled){
                dataOut.writeShort(wireFormat.getWriteCachedKey(ack.getTransactionId()));
            } else {
                if( ack.isXaTransacted()) {
                    ActiveMQXid xid = (ActiveMQXid) ack.getTransactionId();
                    xid.write(dataOut);
                } else {
                    super.writeUTF((String) ack.getTransactionId(), dataOut);
                }           
            }
        }
View Full Code Here

TOP

Related Classes of org.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.