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

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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(); }

      }
      }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                Time Tracking

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

                  PagerDuty