Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hi,
We've a big problem in our project. I will try to explain it:
1- We have three pages: 1.jsp, 2.jsp, 3.jsp
2- In each of these jsp files some data are gathered from user and inserts/updates some data in database.
3- The problem is we want to apply all db changes of these jsp file when receiving request of 3.jsp (last one).
4- For example: 1.jsp inserts some data to table CUSTOMER, 2.jsp updates some data in SERVICES table and 3.jsp delete some rows from CUSTSRV table.
we want to do as below:
when receiving request of 1.jsp, start a database transaction, insert data (that entered by user) in CUSTOMER table, but not commit it and display 2.jsp
when receiving request of 2.jsp, update some rows in SERVICES table, but not commit it and display 3.jsp.
when receiving request of 3.jsp, delete some rows from CUSTSRV table and commit transaction to save all data in db.
if we can not delete specified rows from CUSTSRV, transaction must rollbacked and inserted and updated rows in previous steps must be ignored.
Note: All insert/update/delete are done in servlets using hibernate.
I would appreciate if anyone could guide me in this area.
Thanks in advance,
Arash.