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

SingleSessionCommandService Eats an Actual / Real Exception on Rollback

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.1.0.FINAL
    • Fix Version/s: None
    • Component/s: All
    • Workaround Description:
      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
    • Estimated Difficulty:
      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(); }

      }
      }

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  eaa Esteban Aliverti
                  Reporter:
                  Anat0ly Anatoly Polinsky
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

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