Clone URL (Committers only):
https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://tomee.apache.org/examples-trunk%2Fsimple-cdi-interceptor%2FREADME.md
leonardo kenji shikida
Index: trunk/content/examples-trunk/simple-cdi-interceptor/README.md
===================================================================
--- trunk/content/examples-trunk/simple-cdi-interceptor/README.md
(revision 1560563)
+++ trunk/content/examples-trunk/simple-cdi-interceptor/README.md
(working copy)
@@ -1,3 +1,4 @@
+just fixing the target and retention annotations and adding imports
#Simple CDI Interceptor
Let's write a simple application that would allow us to book tickets for a
movie show. As with all applications, logging is one cross-cutting concern that
we have.
@@ -11,9 +12,16 @@
Let's create an annotation that would "mark" a method for interception.
+ import java.lang.annotation.ElementType;
+ import java.lang.annotation.Retention;
+ import java.lang.annotation.RetentionPolicy;
+ import java.lang.annotation.Target;
+
+ import javax.interceptor.InterceptorBinding;
+
@InterceptorBinding
- @Target({ TYPE, METHOD })
- @Retention(RUNTIME)
+ @Target({ ElementType.FIELD, ElementType.METHOD })
+ @Retention(RetentionPolicy.RUNTIME)
public @interface Log {
}