2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.api
.service
.exception
;
11 import org
.springframework
.transaction
.interceptor
.DefaultTransactionAttribute
;
14 * Base class for all exceptions occurring during data change actions within the service layer.
15 * NOTE: This exception needs to be thrown before any data is saved to the session as it rather forces
16 * commit then rollback. This is intended behavior to avoid full transaction rollback within longer
17 * transactions. This way we do not need an explicit method to check if a data change method will
18 * succeed or fail.<BR>
19 * To avoid rollback the class on purpose does not inherit from RuntimeException
20 * as RuntimeException leads to rollback when using {@link DefaultTransactionAttribute#rollbackOn(Throwable)}
21 * which is used by spring as default transaction attribute.
26 public class DataChangeNoRollbackException
extends Exception
{
27 private static final long serialVersionUID
= -5279586708452619581L;
30 public DataChangeNoRollbackException() {
33 public DataChangeNoRollbackException(String message
) {