1 package example;2 3 import java.lang.annotation.Retention ;4 import java.lang.annotation.RetentionPolicy ;5 import java.lang.annotation.Target ;6 import java.lang.annotation.ElementType ;7 8 /**9 * The require connection annotation.10 */11 @Target (ElementType.METHOD)12 @Retention (RetentionPolicy.RUNTIME)13 public @interface RequireConnection {14 /**15 * The jndi name of the data source.16 */17 String value();18 }19