| Author |
regarding Spring/Hibernate
|
rahul bivalkar
Greenhorn
Joined: Nov 19, 2003
Posts: 16
|
|
This question is regarding Spring MVC and Hibernate. I have code in my SimpleFormController to break out if the cancel button is hit... I verified that it works and is not hitting my onSubmit method... but it is still saving the object with the info from the form... looking at the logs, I can see that it DID NOT enter the onSubmit method and it NEVER red my saveUser method which is the only place that I have code to save that object. Logic would tell me that I have a setting somewhere that tells Hibernate to automatically commit changes to my objects (could be a Spring setting but I'm leaning towards Hibernate)... does anyone know of a setting that would do this? I'm fairly new to both so I'm hoping it is a simple setting somewhere. I am also using a Transaction filter(somebody's suggestion). But I'm not sure I understand why an autocommit is done like this... the Command object is already set when I go to check for the call for cancel... so I would need to reset the object to original state before the Transaction manager decides to commit the changes. Can you give me a hint as to what approach to take?... ex. do I look at the Transaction docs to figure out how to turn the autocommit off or do I do what I mentioned above and just make sure that I reset the Command object to original state?... the 2nd idea seems dumb and the whole idea of autocommit goes against the idea of transactions anyway doesn't it? thanks very much ilango
|
 |
 |
|
|
subject: regarding Spring/Hibernate
|
|
|