You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by leonardo kenji shikida <an...@apache.org> on 2014/01/23 22:52:10 UTC

CMS diff:

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 {
     }