aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes JTA System Exception in the Rollback block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JTA System Exception in the Rollback block" Watch "JTA System Exception in the Rollback block" New topic
Author

JTA System Exception in the Rollback block

Malli Raman
Ranch Hand

Joined: Nov 07, 2001
Posts: 312
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA System Exception in the Rollback block