Deploying Java Web Applications on JBoss

On Apprenda installations that have been configured to support JBoss, developers can set individual Java Web Application components used in their guest applications to use JBoss as the hosting container for deployed instances either through a guest application’s Deployment Manifest or through configuration settings which are editable after the app is created

JBoss on Apprenda supports the Java EE 6 Web Profile with some limitations. In general, if a JBoss feature can be deployed or configured within the Java Web Application workload, Apprenda provides out-of-the-box support. If the feature requires special configuration of the application server or subsystems, the support for the feature may be possible on a case-by-case basis as determined by configuration changes that you Platform Operator is able or willing to make.

The information below pertains to JBoss Application Server 7, which ships the version of JBoss EAP currently supported by Apprenda.

Out-of-the-box support for JBoss features:

Supported Features

Below is a list of Java EE 6 Web Profile Features that are supported on a standard JBoss setup on the Apprenda Platform (without application server configuration changes):

  • Servlet 3.0
  • JavaServer Pages (JSP) 2.2 
  • Expression Language (EL) 2.2
  • Debugging Support for Other Languages (JSR-45) 1.0 
  • Standard Tag Library for JavaServer Pages (JSTL) 1.2 
  • JavaServer Faces (JSF) 2.0 
  • Common Annotations for the Java Platform (JSR-250) 1.1
  • Enterprise JavaBeans (EJB) 3.1 
  • Java Transaction API (JTA) 1.1 
  • Java Persistence API (JPA) 2.0 
  • Bean Validation 1.0 
  • Managed Beans 1.0 
  • Interceptors 1.1 
  • Contexts and Dependency Injection for the Java EE Platform 1.0 
  • Dependency Injection for Java 1.0

Known Limitations

The list below describes known limitations to out-of-the-box JBoss support on Apprenda:

  • Clustering Apprenda only supports deployment of JBoss in standalone mode without clustering.; Any features related to multiple JBoss instances communicating and collaborating to accomplish something are not supported**.  
  • Standalone, not Domain Apprenda deploys JBoss in “standalone” and not in a “domain” mode;  thus, any features related to dealing w/ a set of servers in a JBoss “domain” is not supported.   
  • Minimal Install to support Java EE 6 Web Profile Apprenda configures JBoss w/ a “slimmed down” profile with the minimum number of features/modules needed to support the Java EE 6 Web Profile. Because of this, any JBoss features / modules that go beyond that that might be supported in a “full” Java EE configuration are not supported (e.g., remote EJB invocations, deploying a message queue as a part of JBoss, etc.).   
  • Management Interfaces A typical JBoss deployment provides a number of management interfaces (e.g., being able to connect to a JBoss instance using, using the default web management console, etc.). Because managing individual server/workload instances doesn’t make much sense in the context of a “Apprenda cloud” deployment, and because any configuration changes would not persist across restarts/workload redeploys, those management interfaces have been disabled.   
  • No subsystem or module configuration Many of the more advanced JBoss configuration options require the system administrator or developer to configure various aspects of JBoss by editing the JBoss subsystems (adding new modules shared across the whole application server, enabling/disabling/configuring subsystems for the whole server, deploying server-wide datasources or message queue destinations, etc.). We currently do not provide a way for a developer to modify the subsystem configuration (although some modifications can be performed by the Platform Operator).

JBoss Deployment Descriptors

JBoss Application Server v7  provides a number of deployment/configuration features allowing an application developer or an application deployer to configure how an application works within the container. Because of the modular nature of JBoss, if a developer wants to access particular features/modules deployed w/ a standard JBoss deployment. Below is a listing of deployment/configuration options supported for JBoss in Apprenda out-of-the-box, as well as options where support is dependent on configuration changes made by the Platform Operator.

Deployment Descriptors supported out-of-the-box

A summary of the available deployment descriptors are available in the JBoss documentation on deployment descriptors. In general, if the deployment descriptor can be bundled in the WAR file or inside of jars inside of the WAR’s WEB-INF/lib folder, then it is supported.

  1. Declaring module dependencies in MANIFEST.MF (e.g. in WEB-INF or META-INF in the war file). 

     Dependencies: org.javassist, org.apache.velocity
  2. Declaring module dependencies using a jboss-deployment-structure.xml
              <module name="org.javassist" />
              <module name="org.apache.velocity" export="TRUE" />
  3. Configuring web-application deployment options using jboss-web.xml (in WEB-INF).

     <?xml version="1.0" encoding="utf-8"?>
      <?xml version="1.0" encoding="windows-1252"?>
         <!-- The ExampleDS is set up in JBoss out of the box -->
         <resource-ref id="employeeDbRef">
         <!-- jboss-web.xml doesn't have a way of passing in context params -->

Deployment Descriptors that require configuration changes from the Platform Operator

  1. Deploying JDBC drivers 

    The Platform Operator must make appropriate configuration changes to the JBoss container in order for JDBC drivers included in the WAR file to be detected and deployed by JBoss.

  2. Deploying new data sources using *-ds.xml files

    The Platform Operator must make appropriate configuration changes to the JBoss container in order for data sources included in the WAR file to be detected and deployed by JBoss. Once these changes are made, data sources can be defined as follows:

     <?xml version="1.0" encoding="UTF-8"?>
     <datasources xmlns="" xmlns:xsi="" xsi:schemaLocation="">
         <datasource jndi-name="java:jboss/datasources/TaskrDS" pool-name="TaskrDS" enabled="true" use-java-context="true">
  3. Deploying new JMS queue destinations using a *-jms.xml files

    The Platform Operator must make appropriate configuration changes to the JBoss container in order to support this. Once these changes are made, JMS queue destinations can be defined as per the following example (taken from a 3rd party example):

     <?xml version="1.0" encoding="UTF-8"?>
     <messaging-deployment xmlns="urn:jboss:messaging-deployment:1.0">
                 <jms-queue name="QueueOne">
                     <entry name="java:jboss/exported/TestQueueOne"/>
                 <jms-topic name="TopicOne">
                     <entry name="java:jboss/exported/TestTopicOne"/>