Chapter 6. Advanced container configuration : use of jboss.xml

Table of Contents

What is jboss.xml?
Specifying the deployment name of your beans
Declaring an EJB reference
Container configuration

Author:Sebastien Alborini <sebastien.alborini@m4x.org>

What is jboss.xml?

To deploy your beans, you have to specify (nearly) everything about them in a file called ejb-jar.xml. This file will be stored in the META-INF directory in your ejb-jar file. The content and syntax of this file in specified in the ejb1.1 specification (16.5 Deployment descriptor DTD, pp 244-259).

An important point is that the specification does not allow you to add vendor-specific configuration in this file. While the ejb-jar.xml is sufficient for most applications, there may be cases where you want to add JBoss-specific information in your deployment descriptor. This can be done by providing another file named jboss.xml in the META-INF directory.

Note that this file is almost NEVER required by JBoss: JBoss will always provide a standard behaviour when no jboss.xml file is found. JBoss does that by first processing a standardjboss.xml file which contains the standard configuration.

The following sections will cover most common uses of the jboss.xml file. If you want to know all the details, you can get the DTD for jboss.xml in the file section of the manual. A graphical view of the DTD is given in Figure 6.1.

Figure 6.1. The jboss.xml DTD