what are the consequences of not using the con.rollBack if some exception
Assume your update() method is successful and an exception occurr in updatex() method. Now if you don't rollback your transaction,the data will remain in same state changed by update() method until commit or rollaback.
If same time any other method want to perform any operation on same row changed by update() method then it will get error.
Shailesh
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Annie Smith
Ranch Hand
Joined: Mar 05, 2005
Posts: 172
posted
0
Originally posted by trupti nigam: what are the consequences of not using the con.rollBack if some exception occurs.
When you are performing transaction on any database row, you are locking it and not allowing other users to perform update operations on it. A rollback() or commit() releases the locks.
Cheers!<br /><b>Annie</b>
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.