[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2913) SingleSessionCommandService Constructor Eats an Actual / Real Exception on Rollback

Esteban Aliverti (JIRA) jira-events at lists.jboss.org
Mon Aug 22 04:43:18 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-2913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Esteban Aliverti resolved JBRULES-2913.
---------------------------------------

    Fix Version/s: 5.3.0.CR1
       Resolution: Done


Done:
https://github.com/droolsjbpm/drools/commit/192e07c6490606eed2f1c5982da1ff53b03d367c

> SingleSessionCommandService Constructor Eats an Actual / Real Exception on Rollback 
> ------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2913
>                 URL: https://issues.jboss.org/browse/JBRULES-2913
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.1.1.FINAL
>            Reporter: Esteban Aliverti
>            Assignee: Esteban Aliverti
>            Priority: Minor
>              Labels: SingleSessionCommandService_exception
>             Fix For: 5.3.0.CR1, FUTURE
>
>
> Scenario: The constructor of SingleSessionCommandService tries to persist the created SessionInfo and fails.
> Problem: Because of the failure, SingleSessionCommandService tries to rollback the TX. If the rollback also fail, an exception is thrown with the cause, but the original problem (The failure on SessionInfo persistence) is swallowed. 
> The code of the catch section demonstrate this:
>         try {
>             this.txm.begin();
>  
>             //this.appScopedEntityManager.joinTransaction();
>             registerRollbackSync();
>             jpm.getApplicationScopedPersistenceContext().persist( this.sessionInfo );
>             this.txm.commit();
>         } catch ( Exception t1 ) {
>             try {
>                 this.txm.rollback();
>             } catch ( Throwable t2 ) {
>                 throw new RuntimeException( "Could not commit session or rollback",
>                                             t2 );
>             }
>             throw new RuntimeException( "Could not commit session",
>                                         t1 );
>         }
> If this.txm.rollback() fails, t1 is never logged.
> A similar issue was fixed in JBRULES-2656     

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list