|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) public @interface Transactional
Any method or class marked with this annotation will be considered for transactionality. Consult the documentation on http://www.wideplay.com for detailed semantics.
Marking a method @Transactional
will work with the default configuration as
expected. Any classes marked @Transactional
will only work if you specify the
forAll(Matchers.annotatedWith(Transactional.class), Matchers.any()
clause in your
warp-persist module configuration.
Class level @Transactional
allows you to specify transaction semantics for all
non-private methods in the class once at the top. You can optionally override it on a per-method
basis too. However, this means that classes not marked @Transactional
but with
methods marked @Transactional
will *not* be intercepted for transaction wrapping.
Optional Element Summary | |
---|---|
Class<? extends Exception>[] |
exceptOn
A list of exceptions to *not* rollback on. |
Class<? extends Exception>[] |
rollbackOn
A list of exceptions to rollback on, if thrown by the transactional method. |
TransactionType |
type
This is an experimental feature and is only supported for Hibernate. |
Class<? extends Annotation> |
unit
|
public abstract Class<? extends Annotation> unit
public abstract TransactionType type
public abstract Class<? extends Exception>[] rollbackOn
public abstract Class<? extends Exception>[] exceptOn
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |