Let's explore the JBoss Enterprise Application Platform directory structure and help you understand how the installation is laid out and what goes where. It’s worth familiarizing yourself with the layout, locations of the key configuration files, log files, deployment and so on. It will help you understand the JBoss service architecture so that you’ll be able to find your way around when it comes to deploying your own applications.
2.1. Directory Structure
2.1.1. JBoss Top Level Directory Structure
Installing JBoss Enterprise Application Platform creates a top level directory, which will be named jboss-eap-<version> if you used the zip installation method, and will be named according to your specification if you used the GUI installer. Throughout this guide we refer to this top-level directory as the JBOSS_DIST directory. There are four sub-directories immediately below this:
doc: contains the product documentation.
jboss-as: contains sub directories that contain server start scripts, JARs, server configuration sets and working directories. You need to know your way around the distribution layout to locate JARs for compiling code, updating configurations, deploying your code, etc.
seam: contains the files for Hibernate and the JBoss Seam Framework.
Uninstaller: contains the uninstaller program uninstaller.jar.
Below is the layout of the installation directory of JBoss Enterprise Application Platform. In the figure, the default server configuration file set is shown expanded. In a clean installation, within the server/default directory only the conf, deploy, and lib directories exist. The data, log, tmp and work sub-directories are created by JBoss and won’t exist until you’ve run the server at least once. Section 2.3, “Starting and Stopping the Server” will teach you to run the server.
jboss-eap-<version> // jboss.home_url
|+ doc
|+ jboss-as
|+ bin
|+ client
|+ docs
|+ icons
|+ lib // jboss.lib.url
|+ scripts
|+ server
|+ all // jboss.server.name
|+ default // jboss.server.home.url
|+ conf // jboss.server.config.url
|+ deploy
|+ lib // jboss.server.lib.url
|+ data
|+ log
|+ tmp
|+ work
|+ minimal
|+ production
|+ seam
|+ Uninstaller // jboss.uninstaller.url
Several of the locations may be overridden. For these locations, the org.jboss.system.server.ServerConfig interface constant and its corresponding system property string are shown in the figure. The names ending in URL correspond to locations that can be specified using a URL to access remote locations, for example, HTTP URLs against a web server.
2.1.2. JBOSS_DIST/jboss-as Directory Structure
The table below illustrates the contents of the jboss-as directory.
Directory
Description
bin
Contains startup, shutdown and other system-specific scripts. Basically all the entry point JARs and start scripts included with the JBoss distribution are located in the bin directory.
client
Stores configuration files and JAR files that may be used by a Java client application (running outside JBoss) or an external web container. You can select archives as required or use jbossall-client.jar.
docs
Contains the XML DTDs used in JBoss for reference (these are also a useful source of documentation on JBoss configuration specifics). There are also example JCA (Java Connector Architecture) configuration files for setting up datasources for different databases (such as MySQL, Oracle, Postgres).
lib
Contains startup JARs used by JBoss. Do not place your own JAR files in this directory.
server
Contains the JBoss server configuration sets. Each of the subdirectories in here is a different server configuration. JBoss ships with minimal, default, production, and all configuration sets. The subdirectories and key configuration files contained in the default configuration set are discussed in more detail in subsequent sections.
Table 2.1. Contents of JBOSS_DIST/jboss-as directory