[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2656) SingleSessionCommandService Eats an Actual / Real Exception on Rollback
Esteban Aliverti (JIRA)
jira-events at lists.jboss.org
Wed Aug 25 13:48:12 EDT 2010
[ https://jira.jboss.org/browse/JBRULES-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12546952#action_12546952 ]
Esteban Aliverti commented on JBRULES-2656:
-------------------------------------------
The thing is that we have not created t1 nor t2.
t1 is the original exception thrown by the command execution and t2 is the exception that prevented the transaction to be rollbacked.
I don't see how we can put t1 inside t2. Any idea?
> SingleSessionCommandService Eats an Actual / Real Exception on Rollback
> -----------------------------------------------------------------------
>
> Key: JBRULES-2656
> URL: https://jira.jboss.org/browse/JBRULES-2656
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: All
> Affects Versions: 5.1.0.FINAL
> Environment: N/A
> Reporter: Anatoly Polinsky
> Assignee: Esteban Aliverti
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> 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();
> }
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list