The complexity of writing EJBs can be drastically reduced with the help of Ant and XDoclet. In this chapter, we touched on building EJBs, both session and entity, using a single bean for each and one file for each. The XDoclet code and corresponding Ant task do the job of building the deployment descriptor and remaining support files.