Bhupesh wrote:
>
> I have a stateless session bean that uses Bean Managed Transactions. It
> makes calls to a series of other session beans that perform database
> operations (INSERTS & UPDATES). All of these calls are made within the scope
> of a UserTransaction.
>
> One of the beans that is called uses bean managed transactions and gets a
> JDBC connection (via javax.sql.DataSource) from the server pool. It begins a
> transaction, executes some sql and then commits the transaction.
>
> The issue I have is that as a result of this commit (in the called bean),
> the UserTransaction started in the first bean is also committed. If I try to
> rollback from the first bean it has no affect, all changes made by other
> session beans are committed. Is this correct, or should the commit on the
> second bean have no affect on the transaction running in the first bean?

If your called beans are stateless this is definitely a bug - 11.6.1 of the EJB
spec clearly states that if a called bean uses Bean Managed Transactions the
calling bean's transaction must be suspended at the time of the call.

However if any of the called beans are stateful you might want to look more
closely at your logic and read 11.6.1 very carefully.

Which App Server are you using?


Ian McCallion
Alexis Systems Limited
Romsey, UK

===========================================================================
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".

Reply via email to