[
https://jira.jboss.org/browse/JBRULES-2657?page=com.atlassian.jira.plugin...
]
Anatoly Polinsky commented on JBRULES-2657:
-------------------------------------------
The test is reused from:
https://jira.jboss.org/browse/JBRULES-2656, and since it is not
yet fixed: NO, "The RuntimeException" will not contain the
"WillBeEatenByDroolsException". But the test proves the point.
But glad to hear this particular JIRA is fixed.
Thank you,
/Anatoly
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