Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads and transactions

 
Jeff Wisard
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic