JBossDeploymentDirectory
From Shrubbery
Contents |
[edit] The Server Directory
A deployment or 'configuration' directory in JBoss has the following structure, relative to ${jboss.server.home.dir}:
| File or directory | Description |
|---|---|
${jboss.server.home.dir} | The root directory of the configuration. |
./conf | Main configuration directory. |
./conf/jboss-service.xml | The main configuration file. This defines which services will be started when the server starts. |
./conf/log4j.xml | Logging configuration. |
./conf/login.xml | Security realm configuration. |
./deploy | Deployment directory. Application code goes here (EAR, WAR, etc.). |
[edit] Server Configuration
The main configuration file conf/jboss-service.xml defines JMX MBeans (services) that are needed to boot the server. These typically include:
| MBean Class | Description |
|---|---|
| org.jboss.util.threadpool.BasicThreadPool | A pool of worker threads that will execute requests. |
| org.jboss.logging.Log4jService | Configures Log4J from the ./config/log4j.xml file. |
| org.jboss.deployment.scanner.URLDeploymentScanner | Scans the ./deploy directory for EARs, WARs, etc., which will automatically be loaded into the JBoss server. This MBean loads most of the other services.
|
[edit] Defining JDBC DataSources
This is usually the first thing you need to do in a J2EE application, as pretty much everything needs a JDBC data source. For example:
- The login module used for web/EJB application security might use a data source to retrieve usernames and passwords.
- Durable JMS queues and topics might use the data source to perist queueing data.
- EJB3 / Hibernate code will want to use a data source to persist domain objects.
The simplest way is to put a '*-ds.xml' file in \$\{jboss.server.home.dir\} that describes the JDBC data source. This works well if you have the default deployment scanner configured.
[edit] Creating a server config without Tomcat
Copy the default config, then in the deploy directory:
- Delete jbossweb-tomcat55.sar
- Delete http-invoker.sar
- Delete jmx-console.war
- Delete jbossws14.sar
- Delete jms/jbossmq-httpil.sar
- Delete management
[edit] Creating a JMS-only config
Create the 'no tomcat' config, then:
- Delete mail-ra.rar, mail-service.xml ear-deployer.xml, ejb-deployer.xml
[edit] JMS Connection Pool Size
The JMS connection pool size is defined in deploy/jms/jms-ds.xml

