[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2657) DroolsSpringTransactionManager does not join an Existing Spring Transaction
Anatoly Polinsky (JIRA)
jira-events at lists.jboss.org
Tue Aug 10 18:55:49 EDT 2010
[ https://jira.jboss.org/browse/JBRULES-2657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anatoly Polinsky updated JBRULES-2657:
--------------------------------------
Attachment: drools-spring-tm-jira.zip
root-cause.png
drools-tm-current-tx-null.png
attaching the maven project and screenshots
> 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: Mark Proctor
> Attachments: drools-spring-tm-jira.zip, drools-tm-current-tx-null.png, root-cause.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