details:   https://code.openbravo.com/erp/devel/pi/rev/258f23e6d245
changeset: 31293:258f23e6d245
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Thu Jan 26 19:33:31 2017 +0100
summary:   related to issue 34816: added missing pool name when using 
checkInvariant

Providing the pool name when invoking checkInvariant in commitAndStart method. 
Besides, the private checkInvariant() method has been removed as now is unused.

diffstat:

 src/org/openbravo/dal/core/SessionHandler.java |  6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diffs (23 lines):

diff -r e7a491adc463 -r 258f23e6d245 
src/org/openbravo/dal/core/SessionHandler.java
--- a/src/org/openbravo/dal/core/SessionHandler.java    Thu Jan 26 12:13:07 
2017 +0100
+++ b/src/org/openbravo/dal/core/SessionHandler.java    Thu Jan 26 19:33:31 
2017 +0100
@@ -626,7 +626,7 @@
         "Triggers disabled, commit is not allowed when in triggers-disabled 
mode, "
             + "call TriggerHandler.enable() before committing");
 
-    checkInvariant();
+    checkInvariant(pool);
     flushRemainingChanges(pool);
     Transaction trx = getTransaction(pool);
     if (trx != null) {
@@ -695,10 +695,6 @@
   /**
    * The invariant is that for begin, rollback and commit the session etc. are 
alive
    */
-  private void checkInvariant() {
-    checkInvariant(DEFAULT_POOL);
-  }
-
   private void checkInvariant(String pool) {
     Check.isNotNull(sessions.get(pool), "Session is null");
     Transaction theTx = getTransaction(pool);

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to