View Javadoc
1   package com.atlassian.activeobjects.tx;
2   
3   import com.atlassian.activeobjects.external.TransactionalAnnotationProcessor;
4   import org.springframework.beans.factory.config.BeanPostProcessor;
5   
6   import java.lang.annotation.Documented;
7   import java.lang.annotation.Inherited;
8   import java.lang.annotation.Retention;
9   import java.lang.annotation.Target;
10  
11  import static java.lang.annotation.ElementType.METHOD;
12  import static java.lang.annotation.ElementType.TYPE;
13  import 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
29  public @interface Transactional {
30  }