@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) @Inherited public @interface Transactional
@Transactional
will start a new transaction before the method executes
and commit it after the method returns.
If the method throws an exception, the transaction will be rolled back unless you
have specifically requested not to in the ignore()
clause.
Similarly, the set of exceptions that will trigger a rollback can be defined in the rollbackOn()
clause. By default, only unchecked exceptions trigger a rollback.
public abstract Class<? extends Exception>[] rollbackOn
public abstract Class<? extends Exception>[] ignore
Copyright © 2006–2018 Google, Inc.. All rights reserved.