Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2656

SingleSessionCommandService Eats an Actual / Real Exception on Rollback

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 5.1.0.FINAL
    • All
    • Hide

      set a breakpoint on "t2" exception, and debug down the stacktrace to get to "t1" at runtime

      Show
      set a breakpoint on "t2" exception, and debug down the stacktrace to get to "t1" at runtime
    • Low

      org.drools.persistence.session.SingleSessionCommandService, line 287:

      public synchronized <T> T execute(Command<T> command) {
      try

      { txm.begin(); ... ... ... // omitted for clarity txm.commit(); return result; }

      catch ( Exception t1 ) {
      try

      { txm.rollback(); <<<<<<<<<<<<<< IF THERE IS A PROBLEM DURING ROLLBACK, THE REAL EXCEPTION ( "t1" ) IS EATEN. }

      catch ( Exception t2 )

      { throw new RuntimeException( "Could not commit session or rollback", <<<<< THIS IS THROWN, BUT "t1" IS IGNORED t2 ); }

      throw new RuntimeException( "Could not commit session",
      t1 );
      } finally {
      if ( command instanceof DisposeCommand )

      { this.jpm.dispose(); }

      }
      }

            esteban.aliverti@gmail.com Esteban Aliverti (Inactive)
            Anat0ly Anatoly Polinsky (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived:

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified