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

Table of Contents

What is jboss.xml?
Declaring Resource Reference
Specifying the deployment name of your beans
Declaring an EJB reference
Container configuration
Web container configuration : use of jboss-web.xml

Author:Sebastien Alborini <>

JBoss 2.2 compliance checked by:Vincent Harcq <>

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 via the download link in the documentation section on A graphical view of the DTD is given in Figure 5.1

Figure 5.1. The jboss.xml DTD

Наши друзья