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

Anatoly Polinsky (JIRA) jira-events at lists.jboss.org
Tue Aug 10 18:53:49 EDT 2010


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


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