- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- HomotypicalGroupChangeException, ReferencedObjectUndeletableException
public class DataChangeNoRollbackException
extends java.lang.Exception
Base class for all exceptions occurring during data change actions within the service layer.
NOTE: This exception needs to be thrown before any data is saved to the session as it rather forces
commit then rollback. This is intended behavior to avoid full transaction rollback within longer
transactions. This way we do not need an explicit method to check if a data change method will
succeed or fail.
To avoid rollback the class on purpose does not inherit from RuntimeException
as RuntimeException leads to rollback when using DefaultTransactionAttribute.rollbackOn(Throwable)
which is used by spring as default transaction attribute.
- Since:
- 13.10.2011
- Author:
- a.mueller
- See Also:
- Serialized Form