Forums Register Login

Transaction cross connections?

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
James,

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.
+Pie Number of slices to send: Send
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?

regards,
James
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 993 times.
Similar Threads
How to control the transaction with external system?
Definitive Best practices with JDBC and oracle
XADataSource vs. Common Everyday DataSource
Client Responsibilities?
releasing connection in CMT
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:45:40.