WriteThe EJB and RMI stubs and other classes are often annoying and monotonous for the normal operation of virtual machines. Once the host class is changed, you must modify the stub code in addition to the code. XDoclet provides a good solution.
XDoclet and ant are integrated and run at compile time through ant custom labels. You can use these labels like other Ant tasks.
To use XDoclet, you must add custom Javadoc labels to the code. When XDoclet is running, it will interpret these as class attributes and use them to generate source code.
To change these attributes, you need to change the labels corresponding to XDoclet. The next time you compile your program, these changes will be reflected in your new stub class. That is to say, you only need to manage your EJB in one place, and the whole process becomes more efficient.
XDoclet can not only generate code for EJB, but also do the same work for Hibernate, JBoss, WebSphere, BEA, JMX, JDO, and other components and software. XDoclet has become a common code generation tool.