long transactionId, Xid xid, boolean redeliver,
boolean setRedelivered) throws JMSServiceException {
JMSServiceReply reply;
HashMap props = new HashMap();
IMQConnection cxn;
TransactionUID txnUID = null;
JMQXid jmqXid = null;
Integer xaFlags = null;
cxn = checkConnectionId(connectionId, "rollbackTransaction");
txnUID = new TransactionUID(transactionId);
if (xid != null) {
jmqXid = new JMQXid(xid);
/*
xaFlags = new Integer(flags);
*/
}
try {
protocol.rollbackTransaction(txnUID, jmqXid, xaFlags, cxn, redeliver, setRedelivered);
} catch(BrokerException be) {
String errStr = "rollbackTransaction: rollback transaction failed. Connection ID: "
+ connectionId
+ ", Transaction ID: "
+ transactionId
+ ", XID: "
+ xid;
logger.logStack(Logger.ERROR, errStr, be);
props.put("JMQStatus", getErrorReplyStatus(be));
throw new JMSServiceException(errStr, be, props);
}
props.put("JMQStatus", JMSServiceReply.Status.OK);
props.put("JMQTransactionID", txnUID.longValue());
reply = new JMSServiceReply(props, null);
return (reply);
}