permaculture playing cards
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Transaction cross connections? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Transaction cross connections?" Watch "Transaction cross connections?" New topic

Transaction cross connections?

James Du
Ranch Hand

Joined: Mar 23, 2001
Posts: 186
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?

[ February 27, 2005: Message edited by: James Du ]

Joined: May 24, 2004
Posts: 7

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.

Sanjeev Dogra<br /> <br />SCJP, SCWCD, SCBCD<br />IBM WSAD Certified<br />SCEA(in progress)
James Du
Ranch Hand

Joined: Mar 23, 2001
Posts: 186
Hi Dogra,

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?

I agree. Here's the link:
subject: Transaction cross connections?
It's not a secret anymore!