/* * (C) Copyright 2009 Nuxeo SA (http://nuxeo.com/) and contributors. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 2.1 which accompanies this distribution, and is available at * http://www.gnu.org/licenses/lgpl.html * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * Contributors: * Florent Guillaume */ package org.nuxeo.ecm.core.api; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * This specifies that the annotated method should not provoke a transaction * rollback when an exception is raised. * <p> * This is checked by pseudo-containers like TransactionalCoreSession. * <p> * Ideally, all exceptions should provoke a transaction rollback, but some old * user code calls a few methods assuming the transaction stays active. */ @Documented @Inherited @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface NoRollbackOnException { }