All, I'm after some clarification as to my understanding about how transaction propogation works.
I have a Stateful session bean (A) with bean managed transactions. This bean obtains a UserTransaction object (sessionContext.getUserTransaction) and begins a transaction. It then calls various stateless session beans that actually insert/update data. These stateless beans have container managed transactions with a transaction attribute of Requires. Bean A then makes a call to another Stateful session bean (B). Bean B also obtains a UserTransaction object (sessionContext.getUserTransaction) and checks the STATUS. If there is already a transaction active it continues to call other stateless beans to update/insert records in the same way that bean A did. It then returns control back to beans A. If there isn't an active transaction it begins and commits/rollsback locally. The problem I have is that when I try to commit or rollback in bean A I sometimes get a javax.transaction.HeuristicMixedException. I'm a little confused as this problem seems to occur randomly even when using exactly the same data/sequence of events. When I call userTransaction.getStatus() in bean B this does return me what I expect (STATUS_ACTIVE) and I do not commit or rollback from bean B. Am I correct in assuming that when I obtain a UserTransaction object (sessionContext.getUserTransaction) in bean B, this should be the same UserTransaction that is active from bean A? Could this be a bug in my container or is what I'm trying to do not correct? regards Bhupesh Wagjiani =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
