/activeobjects-core/src/main/java/com/atlassian/activeobjects/tx/Transactional.java
Java | 30 lines | 16 code | 4 blank | 10 comment | 0 complexity | dcca2170032b6fd8b6f873e6f62cadc4 MD5 | raw file
Possible License(s): Apache-2.0
1package com.atlassian.activeobjects.tx;
2
3import com.atlassian.activeobjects.external.TransactionalAnnotationProcessor;
4import org.springframework.beans.factory.config.BeanPostProcessor;
5
6import java.lang.annotation.Documented;
7import java.lang.annotation.Inherited;
8import java.lang.annotation.Retention;
9import java.lang.annotation.Target;
10
11import static java.lang.annotation.ElementType.METHOD;
12import static java.lang.annotation.ElementType.TYPE;
13import static java.lang.annotation.RetentionPolicy.RUNTIME;
14
15/**
16 * <p>Annotating methods of an interface with this annotation will make those methods run within a transaction
17 * provided by the host application.</p>
18 * <p><strong>Note</strong> that in order for this annotation to be processed, one must declare the
19 * {@link TransactionalAnnotationProcessor} as a component within their plugin.
20 * This processor is a {@link BeanPostProcessor} which will only be able to handle classes instanciated as a
21 * <a href="http://confluence.atlassian.com/display/PLUGINFRAMEWORK/Component+Plugin+Module">components</a>.</p>
22 *
23 * @see TransactionalAnnotationProcessor
24 */
25@Retention(RUNTIME)
26@Target({TYPE, METHOD})
27@Inherited
28@Documented
29public @interface Transactional {
30}