}
break;
case PacketType.RECOVER_TRANSACTION_REPLY:
try {
JMQXid xid;
Integer quantity = (Integer)props.get("JMQQuantity");
n = 0;
if (quantity != null) {
n = quantity.intValue();
}
DataInputStream dis = new DataInputStream(is);
while (n > 0) {
xid = JMQXid.read(dis);
os.println("[XID=" + xid + "], ");
n--;
}
} catch (IOException e) {
os.println("Could not decode XIDs: " + e);
}
break;
case PacketType.INFO:
try {
ObjectInputStream dis = new ObjectInputStream(is);
Hashtable ht = (Hashtable)dis.readObject();
Iterator itr = ht.entrySet().iterator();
while (itr.hasNext()) {
Map.Entry mEntry = (Map.Entry)itr.next();
Object key = mEntry.getKey();
Object value = mEntry.getValue();
if (value instanceof Hashtable) {
os.println("\tTable: " + key);
Iterator itr1 = ((Hashtable)value).entrySet().iterator();
while (itr1.hasNext()) {
Map.Entry mEntry1 = (Map.Entry)itr1.next();
Object key1 = mEntry1.getKey();
Object value1 = mEntry1.getValue();
os.println("\t\t"+key1 + "=" + value1 );
}
} else {
os.println("\t"+key + "=" + value );
}
}
} catch (Exception e) {
os.println("Could not decode INFO packet: " + e);
}
break;
case PacketType.START_TRANSACTION:
case PacketType.COMMIT_TRANSACTION:
case PacketType.ROLLBACK_TRANSACTION:
case PacketType.END_TRANSACTION:
case PacketType.PREPARE_TRANSACTION:
case PacketType.RECOVER_TRANSACTION:
try {
JMQXid xid;
xid = JMQXid.read(new DataInputStream(is));
os.println("[XID=" + xid + "]");
} catch (IOException e) {
os.println("Could not decode XID: " + e);
}