This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes transaction rollback in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "transaction rollback in servlet" Watch "transaction rollback in servlet" New topic

transaction rollback in servlet


Joined: Sep 09, 2002
Posts: 2
hi friends
plz help me out!
i m entering data in 6 table thru a html form, i want that if there is a failure in between updating the tables the transaction shud be roll back. i have turned off the autocommit and use addBatch(sql) to add all sql statments and then executeBatch() and after that connection.commit(). this is working fine a standalone application but it is not working in servlets.
It is sorta covered in the JavaRanch Style Guide.
subject: transaction rollback in servlet
Similar Threads
How to rollback multiple prepared statements
How to prevent a race condition between reading and updating
Data getting saved in session, but not being persisted in table.
Using transaction processing (commit())
Mixing direct SQL with HQL in the same transaction