JBoss Deployment Directory

From Shrubbery

(Redirected from JBossDeploymentDirectory)
Jump to: navigation, search


Contents

The Server Directory

A deployment or 'configuration' directory in JBoss has the following structure, relative to ${jboss.server.home.dir}:

File or directoryDescription
${jboss.server.home.dir}The root directory of the configuration.
./confMain configuration directory.
./conf/jboss-service.xmlThe main configuration file. This defines which services will be started when the server starts.
./conf/log4j.xmlLogging configuration.
./conf/login.xmlSecurity realm configuration.
./deployDeployment directory. Application code goes here (EAR, WAR, etc.).

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 ClassDescription
org.jboss.util.threadpool.BasicThreadPoolA pool of worker threads that will execute requests.
org.jboss.logging.Log4jServiceConfigures Log4J from the ./config/log4j.xml file.
org.jboss.deployment.scanner.URLDeploymentScannerScans the ./deploy directory for EARs, WARs, etc., which will automatically be loaded into the JBoss server. This MBean loads most of the other services.

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.

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

Creating a JMS-only config

Create the 'no tomcat' config, then:

  • Delete mail-ra.rar, mail-service.xml ear-deployer.xml, ejb-deployer.xml

JMS Connection Pool Size

The JMS connection pool size is defined in deploy/jms/jms-ds.xml

Personal tools