• Post Reply Bookmark Topic Watch Topic
  • New Topic

Nested Transaction in JTA  RSS feed

 
Steve James
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

JTA does not accept nested transactions. Here i have a snippet of code which describes a Flat Transaction .



Please tell what is a Nested Transaction.
 
Devaka Cooray
Marshal
Posts: 5325
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose that you already have a JTA (or resource local) transaction on a business method. And if you attempt to start another transaction, without committing/rollingback the existing transaction, you are going to start a nested transaction. As Java EE doesn't support this, an exception will be thrown. In other words, you cannot start another transaction, within the scope of an active transaction.

Devaka.
 
Steve James
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You mean to say like this :

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