Maybe I didn't read good enough the manual, but how can I make an application data to be commited to the DB after several user actions?
What do I need:
I am using struts for a web application and I want to collect the data from the user input from several forms and then save it in the DB. At the moment I am making updates in the DB but not flushing/committing them, assuming that they will still be there when I reuse my current session. I used the sample from the documentation about how to make a Tomcat application. However when I try to execute session.flush() I get a NullPointerException.
Is there an example where I can see how can this be done. A Rollback example would be nice too.
Thanks in advance
|