in geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoveryImpl.java [204:225]
private void removeNameFromTransaction(XidBranchesPair xidBranchesPair, String name, boolean warn) {
int removed = 0;
for (Iterator branches = xidBranchesPair.getBranches().iterator(); branches.hasNext();) {
TransactionBranchInfo transactionBranchInfo = (TransactionBranchInfo) branches.next();
if (name.equals(transactionBranchInfo.getResourceName())) {
branches.remove();
removed++;
}
}
if (warn && removed == 0) {
log.log(Level.SEVERE, "XAResource named: " + name + " returned branch xid for xid: " + xidBranchesPair.getXid() + " but was not registered with that transaction!");
}
if (xidBranchesPair.getBranches().isEmpty() && 0 != removed ) {
try {
ourXids.remove(new ByteArrayWrapper(xidBranchesPair.getXid().getGlobalTransactionId()));
txManager.getTransactionLog().commit(xidBranchesPair.getXid(), xidBranchesPair.getMark());
} catch (LogException e) {
recoveryErrors.add(e);
log.log(Level.SEVERE, "Could not commit", e);
}
}
}