details:   https://code.openbravo.com/erp/devel/pi/rev/589cef1e8c96
changeset: 19785:589cef1e8c96
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Thu Feb 21 13:57:18 2013 +0100
summary:   Fixes issue 23138: AcctServer process does not make a commit for DAL 
transactions.

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/Posted.java |  1 +
 src/org/openbravo/erpCommon/ad_forms/AcctServer.java    |  8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diffs (36 lines):

diff -r 411bdc2be726 -r 589cef1e8c96 
src/org/openbravo/erpCommon/ad_actionButton/Posted.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/Posted.java   Fri Feb 22 
07:57:22 2013 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/Posted.java   Thu Feb 21 
13:57:18 2013 +0100
@@ -240,6 +240,7 @@
         return myMessage;
       }
       releaseCommitConnection(con);
+      OBDal.getInstance().commitAndClose();
     } catch (Exception e) {
       log4j.error(e);
       myMessage = Utility.translateError(this, vars, vars.getLanguage(), 
e.getMessage());
diff -r 411bdc2be726 -r 589cef1e8c96 
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer.java      Fri Feb 22 
07:57:22 2013 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer.java      Thu Feb 21 
13:57:18 2013 +0100
@@ -409,6 +409,7 @@
           return;
         } else {
           connectionProvider.releaseCommitConnection(con);
+          OBDal.getInstance().commitAndClose();
         }
       }
       if (log4j.isDebugEnabled() && data != null)
@@ -660,6 +661,13 @@
     this.m_as = retValue;
   }
 
+  /**
+   * This method handles the accounting of the record identified by strClave. 
Due to the possibility
+   * of developing processes that may run after the standard accounting the 
commit of the
+   * transactions made in this method cannot be done here. The commit must be 
handled in the caller
+   * of this method appropriately. Realize that you must handle the commit of 
the transactions made
+   * through a normal or a DAL connection.
+   */
   public boolean post(String strClave, boolean force, VariablesSecureApp vars,
       ConnectionProvider conn, Connection con) throws ServletException {
     Record_ID = strClave;

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to