User: sparre  
  Date: 01/04/29 23:38:21

  Modified:    src/main/org/jboss/tm/usertx/server
                        UserTransactionSessionImpl.java
  Log:
  Fixed commit:
  If a IllegalStateException or RollbackException was thrown,
  the server side would not forget about the transaction, as it should.
  
  Revision  Changes    Path
  1.2       +13 -2     
jboss/src/main/org/jboss/tm/usertx/server/UserTransactionSessionImpl.java
  
  Index: UserTransactionSessionImpl.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/tm/usertx/server/UserTransactionSessionImpl.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UserTransactionSessionImpl.java   2001/04/29 08:12:52     1.1
  +++ UserTransactionSessionImpl.java   2001/04/30 06:38:21     1.2
  @@ -157,8 +157,19 @@
         if (tx == null)
            throw new IllegalStateException("No transaction.");
   
  -      tx.commit();
  -      activeTx.remove(tpc);
  +      boolean finished = true;
  +
  +      try {
  +         tx.commit();
  +      } catch (java.lang.SecurityException ex) {
  +         finished = false;
  +         throw ex;
  +      } catch (java.lang.IllegalStateException ex) {
  +         finished = false;
  +         throw ex;
  +      } finally {
  +         activeTx.remove(tpc);
  +      }
      }
   
      /**
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to