Chapter 5. XDoclet

Table of Contents

For nearly all J2EE technologies, it is necessary for web services to deliver beside the actual java classes also a description (usually in XML), which describes attributes apart from the pure implementation.

These descriptions are called deployment descriptors, which are used at deployment time to define certain properties. This is the case for enterprise java beans und also for web services[2].

To avoid the problem changing multiple files, if e.g a classname changes, the attribute-oriented programming AOP with XDoclet uses the principle of including all information especially all attributes directly in the java source code. If anything changes, the metafiles will then be regenerated by XDoclet . By this all files are consistent and you have a better overview as you do not have to re-check at n places, what a class exactly does.

5.1. XDoclet comments

XDoclet uses javadoc comments, in order to accommodate the additional attributes in the java source code.


 * @author sr
 * @axis.service name="MyTestService" scope="Request" enable-remote-admin="true"1
public class TestService {
1 Here a web service is defined by a XDoclet comment.


[2] The list can be extended at will: servlets, taglibs, OR mappings, ...