db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattba...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/odmg J2EETransactionImpl.java
Date Mon, 06 Jan 2003 22:47:33 GMT
mattbaird    2003/01/06 14:47:33

  Modified:    src/java/org/apache/ojb/odmg J2EETransactionImpl.java
  Log:
  updates for j2ee transaction to properly report errors back to the transactionmanager
  
  Revision  Changes    Path
  1.15      +5 -8      jakarta-ojb/src/java/org/apache/ojb/odmg/J2EETransactionImpl.java
  
  Index: J2EETransactionImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/odmg/J2EETransactionImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- J2EETransactionImpl.java	20 Dec 2002 02:13:39 -0000	1.14
  +++ J2EETransactionImpl.java	6 Jan 2003 22:47:33 -0000	1.15
  @@ -141,7 +141,7 @@
   				JTATxManager mgr = (JTATxManager)TxManagerFactory.instance();
   				if (mgr.getJTATransaction().getStatus() == Status.STATUS_MARKED_ROLLBACK)
   				{
  -					doAbort();				
  +					abort();
   				}
   				else
   				{
  @@ -151,12 +151,11 @@
                   /*
                    * MBAIRD: hack to get around the lack of swizzling.
                    */
  -                //getBroker().clearCache();
  +                getBroker().clearCache();
               }
               catch (Throwable t)
               {
  -				TxManagerFactory.instance().abortExternalTx(this);
  -				doAbort();
  +				abort();
                   if (log.isDebugEnabled())
                   {
                       log.debug(t.getMessage());
  @@ -193,7 +192,6 @@
           }
           catch (Exception ex)
           {
  -			TxManagerFactory.instance().abortExternalTx(this);
               // We should not reach this block
               log.warn("!! Error while commit PB-Instance, system could be in a inconsistent
condition !!");
               if (log.isDebugEnabled())
  @@ -201,8 +199,7 @@
                   log.debug(ex.getMessage());
                   ex.printStackTrace();
               }
  -            doAbort();
  -			doClose();
  +            abort();
               throw new OJBRuntimeException("Unexpected error occured while commit PB", ex);
           }
       }
  @@ -211,7 +208,7 @@
       {
           try
           {
  -            super.abort();
  +            doAbort();
               TxManagerFactory.instance().abortExternalTx(this);
           }
           catch (Throwable t)
  
  
  

Mime
View raw message