This is a rather theoretical question:
In my service classes I tend to always do a rollback if the operation cannot take place for whatever reason, even if the cause is false input or any other condition that's expected and checked.
In a web-application employing the Open Session in View pattern (OSIV) this has the nasty side-effect that the session is closed and any subsequent lazy-load operation fails. I have to write ugly plumbing code to only rollback the session at the end of the request when an error occured at some point during the request.
This got me thinking: Should rollbacks be an exceptional measure in cases something really went wrong? Should service methods have to make sure by themselves that no data is written/changed if the conditions aren't met? How to deal with the case when the front-end layer updates a model object (like in a form) when input validation was successful but the service method decides the selected input is illegal? Hibernate for example would persist these changes automatically in default configuration when no rollback is done.
Looking forward to you opinions and tips!