• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTA System Exception in the Rollback block  RSS feed

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to JTA API.In JTA API, UserTransaction.rollback throws javax.transaction.SystemException. In this case, if any SystemException arises what will be the condition of the transaction.
let say utx is the userTransaction Object.
try
{
utx.begin();
.....
some transaction takes place
.....
utx.commit()
}
catch(Exception e)
{
try
{
utx.rollback();
}
catch(javax.transaction.SystemException se)
{
System.out.println("System Exception occured in the Rollback");
}
}
So In this case if any exception occures in the main Block and rollback throws any system exception then what will happen to the transaction.
Regards,
M.S.Raman.
 
Hey, sticks and stones baby. And maybe a wee mention of my stuff:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!