I know XDoclet has various @tags for various EJB containers. Does that mean my application will run on all application servers?

Ara Abrahamian

No, XDoclet can't do any magic :-)

But at least it can make it a lot easier. There's built-in support for various application servers, so you can create deployment descriptors of each application server using XDoclet easily. For example to support jBoss there's a @jboss:blabal set of @tags, same is true for @weblogic:blabl, @orion:blabla, @websphere:blabla and so on. What you can do is to add these vendor-specific @tags to your source and generate deployment descriptors for each of the application servers you like. For example say you want to deploy CMP beans to both Orion and jboss. You define the database mapping by putting @tags of both @orion and @jboss for CMP beans. Here is how you define the mapping for a persistence field:

 * @weblogic:dbms-column "name"
 * @orion:persistence persistence-name="name" sql-type="VARCHAR"
 public abstract String getName();

Each application server supports different options and settings but using XDoclet you have a neat way of supporting each by simply maintaining them in the same source code.