Skip to content
Permalink
Browse files
prevent one phase commit continue into 2 phase commit, should fix uni…
…t test in geronimo-connector

git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@733049 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Lin Sun committed Jan 9, 2009
1 parent 9de411a commit ae7850bac3597ac3f5da6ee7d1013948a928dc08
Showing 1 changed file with 3 additions and 4 deletions.
@@ -302,8 +302,9 @@ public void commit() throws HeuristicMixedException, HeuristicRollbackException,
if (resourceManagers.size() == 1) {
TransactionBranch manager = (TransactionBranch) resourceManagers.getFirst();
commitResource(manager);
}

return;
}

boolean willCommit = false;
try {
// two-phase
@@ -313,7 +314,6 @@ public void commit() throws HeuristicMixedException, HeuristicRollbackException,
throw e;
}


// notify the RMs
if (willCommit) {
commitResources(resourceManagers);
@@ -404,7 +404,6 @@ private void beforePrepare() {

//helper method used by Transaction.commit and XATerminator prepare.
private boolean internalPrepare() throws SystemException {

for (Iterator rms = resourceManagers.iterator(); rms.hasNext();) {
synchronized (this) {
if (status != Status.STATUS_PREPARING) {

0 comments on commit ae7850b

Please sign in to comment.