[jboss-jira] [JBoss JIRA] Closed: (JBRULES-2657) DroolsSpringTransactionManager does not join an Existing Spring Transaction

Esteban Aliverti (JIRA) jira-events at lists.jboss.org
Sun Aug 15 16:21:12 EDT 2010


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

Esteban Aliverti closed JBRULES-2657.
-------------------------------------



> DroolsSpringTransactionManager does not join an Existing Spring Transaction
> ---------------------------------------------------------------------------
>
>                 Key: JBRULES-2657
>                 URL: https://jira.jboss.org/browse/JBRULES-2657
>             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
>             Fix For: 5.1.1.FINAL
>
>         Attachments: drools-spring-tm-jira.zip, drools-tm-current-tx-null.png, root-cause.png, tx-config.png
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> DroolsSpringTransactionManager:
>     public void begin() {
>         if ( getStatus() == TransactionManager.STATUS_NO_TRANSACTION ) {                          <<<<<    IF Spring TX ALREADY EXISTS, "currentTransaction" NEVER GETS INITIALIZED ( GET A REFERENCE TO THE REAL TX )
>             // If there is no transaction then start one, we will commit within the same Command
>             // it seems in spring calling getTransaction is enough to begin a new transaction
>             currentTransaction = this.ptm.getTransaction( td );
>             localTransaction = true;
>         } else {
>             localTransaction = false;   
>         }
>     }
> So in case "DroolsSpringTransactionManager" decides to, for example, rollback:
>     public void rollback() {
>         this.localTransaction = false;        
>         this.ptm.rollback( currentTransaction );   <<< IT'LL THROW A NULLPOINTEREXCEPTION HERE
>     }

-- 
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