This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In a typical j2ee application, a transaction scope may cover multiple ejb invocations, which in turn involve multiple db connections. my question is that: how can container have the ability of taking all the operations within these connections as atomic.
As per my knowledge, for a DBMS, take oracle for example, transaction can not cross connection, but within it.
What do you think?
Regards, James [ February 27, 2005: Message edited by: James Du ]
Your are correct just to add on this. We don't directly deal with the EJB we play around with handle of entity.
There is only one entity and multiple client invoking this with different Component interface handle. This is Obvious that we cannot have more then one lock on DB row. Client in transaction with one method..Other client cannot get the lock on DB row until.. previous client finished. So he need to wait or else timeout.
I can't understand you very well, while after the studying of the JTA specification, I found that the usage of the UserTransaction could potentially result in a 2-phase commit transaction regless of the fact that only one db is involed. I wonder if the bean-ralated transactions are also treated in this way.
This remains very confusing for me. Could onyone else be in help?