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.error("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())); txLog.commit(xidBranchesPair.getXid(), xidBranchesPair.getMark()); } catch (LogException e) { recoveryErrors.add(e); log.error("Could not commit", e); } } }
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.error("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())); txLog.commit(xidBranchesPair.getXid(), xidBranchesPair.getMark()); } catch (LogException e) { recoveryErrors.add(e); log.error("Could not commit", e); } } }
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.error("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())); txLog.commit(xidBranchesPair.getXid(), xidBranchesPair.getMark()); } catch (LogException e) { recoveryErrors.add(e); log.error(e); } } }
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.error("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.error("Could not commit", e); } } }