|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
@Inherited
public @interface Transactional
Any method or class marked with this annotation will be considered for transactionality.
Consult the documentation on http://code.google.com/p/google-guice for detailed semantics.
Marking a method @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.
| Optional Element Summary | |
|---|---|
java.lang.Class<? extends java.lang.Exception>[] |
ignore
A list of exceptions to not rollback on. |
java.lang.Class<? extends java.lang.Exception>[] |
rollbackOn
A list of exceptions to rollback on, if thrown by the transactional method. |
public abstract java.lang.Class<? extends java.lang.Exception>[] rollbackOn
public abstract java.lang.Class<? extends java.lang.Exception>[] ignore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||