NullPointerException when trying to list prepared transactions as JSON - part 2
This commit is contained in:
parent
da5c5f7241
commit
d7f245f1ca
|
@ -872,7 +872,14 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
||||||
JSONArray txDetailListJson = new JSONArray();
|
JSONArray txDetailListJson = new JSONArray();
|
||||||
for (Map.Entry<Xid, Long> entry : xidsSortedByCreationTime) {
|
for (Map.Entry<Xid, Long> entry : xidsSortedByCreationTime) {
|
||||||
Xid xid = entry.getKey();
|
Xid xid = entry.getKey();
|
||||||
TransactionDetail detail = new CoreTransactionDetail(xid, resourceManager.getTransaction(xid), entry.getValue());
|
|
||||||
|
Transaction tx = resourceManager.getTransaction(xid);
|
||||||
|
|
||||||
|
if (tx == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TransactionDetail detail = new CoreTransactionDetail(xid, tx, entry.getValue());
|
||||||
|
|
||||||
txDetailListJson.put(detail.toJSON());
|
txDetailListJson.put(detail.toJSON());
|
||||||
}
|
}
|
||||||
|
@ -908,7 +915,14 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
|
||||||
|
|
||||||
for (Map.Entry<Xid, Long> entry : xidsSortedByCreationTime) {
|
for (Map.Entry<Xid, Long> entry : xidsSortedByCreationTime) {
|
||||||
Xid xid = entry.getKey();
|
Xid xid = entry.getKey();
|
||||||
TransactionDetail detail = new CoreTransactionDetail(xid, resourceManager.getTransaction(xid), entry.getValue());
|
|
||||||
|
Transaction tx = resourceManager.getTransaction(xid);
|
||||||
|
|
||||||
|
if (tx == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TransactionDetail detail = new CoreTransactionDetail(xid, tx, entry.getValue());
|
||||||
|
|
||||||
JSONObject txJson = detail.toJSON();
|
JSONObject txJson = detail.toJSON();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue