• Post Reply Bookmark Topic Watch Topic
  • New Topic

find out if there is a transaction associated with current thread?

 
scott miles
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is in context of JTA
There is a method commit in user transaction class. When we do commit on it, first it finds that if there is a
transaction associated with this thread. My question is how at core java level we/JTA can find out if there is a
transaction associated with current thread? (i know its a internal process to JTA apis but still interested )
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is the UserTransaction.getStatus() method which will return a value of javax.transaction.Status.NoTransaction when there is no transaction associated with the current thread.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!