geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/core/src/java/org/apache/geronimo/transaction/manager TransactionImpl.java
Date Wed, 15 Oct 2003 19:36:47 GMT
djencks     2003/10/15 12:36:47

  Modified:    modules/core/src/java/org/apache/geronimo/transaction/manager
                        TransactionImpl.java
  Log:
  Resume an XAResource if it already knows a (suspended) xid
  
  Revision  Changes    Path
  1.2       +7 -2      incubator-geronimo/modules/core/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
  
  Index: TransactionImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/core/src/java/org/apache/geronimo/transaction/manager/TransactionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransactionImpl.java	29 Sep 2003 00:32:40 -0000	1.1
  +++ TransactionImpl.java	15 Oct 2003 19:36:47 -0000	1.2
  @@ -160,8 +160,13 @@
               for (Iterator i = resourceManagers.iterator(); i.hasNext();) {
                   ResourceManager manager = (ResourceManager) i.next();
                   boolean sameRM;
  +                //if the xares is already known, we must be resuming after a suspend.
  +                if (xaRes == manager.committer) {
  +                    xaRes.start(manager.branchId, XAResource.TMRESUME);
  +                    return true;
  +                }
  +                //Otherwise, see if this is a new xares for the same resource manager
                   try {
  -                    // @todo should we check if xaRes.equals(manager.committer) ?
                       sameRM = xaRes.isSameRM(manager.committer);
                   } catch (XAException e) {
                       log.warn("Unexpected error checking for same RM", e);
  
  
  

Mime
View raw message