Annotation-based programming is one of the tools that WebSphere® Rapid Deployment (WRD) application uses to provide an extensible mechanism for generating application artifacts, packaging the application, and readying the application for execution.. Annotation-based programming offers a set of tags and a processing mechanism that allow you to embed additional metadata in your Java™ source code. Annotation-based programming uses this additional metadata to derive the artifacts required to execute the application in a J2EE environment.
Goal of annotation-based programming
The goal of annotation-based programming is to minimize the number of artifacts that you have to create and maintain, thereby simplifying the development process.
/** * @ejb.interface-method view-type=remote */ public String hello(String name) { return "Hello: " + name; }
where @ejb.interface-method view-type=remote is an example of an annotation tag.
Annotation Tags
WRD supports annotations using Javadoc-style comments within the Java source file. You may include annotations in the package, class, field, or method declarations. In addition, WRD supports the tag syntax of XDoclet where it exists. For more information on XDoclet, see http://xdoclet.sourceforge.net/xdoclet/index.html.