This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Threads and transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Threads and transactions" Watch "Threads and transactions" New topic
Author

Threads and transactions

Jeff Wisard
Ranch Hand

Joined: Jan 07, 2002
Posts: 89
I have a quick question about threads and transactions.

Does the J2EE spec guarantee a single thread per transaction? That is, during the course of a transction, can the execution of the transaction switch to a different thread?

If a single thread is guaranteed for a transaction, does that hold true when a transaction encompasses calls between applications deployed in different ears on the same JVM (container)?

Thanks!


Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

The J2EE spec. guarentees nothing about threads, whether in a transaction or not, other than they are the sole responsibility of the container. So you should not have to worry about them at all.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
Consider Paul's rocket mass heater.
 
subject: Threads and transactions
 
Similar Threads
Container Managed Transaction - Synchronization question
JTA
Connection pooling vs using a single connection
NX: Locking and Unlocking and Sun's Must Conditions
JTA and Container managed transactions