Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-1754

StaleObjectLog verbosity control code should be added to flushSession()

XMLWordPrintable

    • 0
    • 0% 0%

      DbPersistenceService.flushSession line #272
      Since a StaleObjectStateExcetion occures in flushSession() rather than commit(), StaleObjectLog verbosity control code should be added to flushSession() method as the same manner as commit(). See the following code snippet. An external transaction manager is being used and indeed DbPersistenceService.commit() does nothing.

      Exception flushSession() {
      if (mustSessionBeFlushed) {
      try {
      log.debug("flushing hibernate session " + session.toString());
      session.flush();
      // >>>>>>> begin
      } catch (StaleObjectStateException e)

      { log.info("optimistic locking failed"); StaleObjectLogConfigurer.staleObjectExceptionsLog.error("optimistic locking failed", e); return e; // <<<<<<< end }

      catch (Exception e)

      { log.error("hibernate flush failed", e); return e; }

      }
      return null;
      }

            aguizar_jira Alejandro Guizar (Inactive)
            aguizar_jira Alejandro Guizar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: