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.
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):
The list below describes known limitations to out-of-the-box JBoss support on Apprenda:
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.
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.
Declaring module dependencies in MANIFEST.MF (e.g. in WEB-INF or META-INF in the war file).
Dependencies: org.javassist, org.apache.velocity
<jboss-deployment-structure> <deployment> <dependencies> <module name="org.javassist" /> <module name="org.apache.velocity" export="TRUE" /> </dependencies> </deployment> </jboss-deployment-structure>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="windows-1252"?> <jboss-web> <env-entry> <env-entry-name>taxExemptions</env-entry-name> <env-entry-value>10</env-entry-value> <env-entry-type>java.lang.Integer</env-entry-type> </env-entry> <!-- The ExampleDS is set up in JBoss out of the box --> <resource-ref id="employeeDbRef"> <res-ref-name>jdbc/EmployeeDB</res-ref-name> <jndi-name>java:jboss/datasources/TaskrDS</jndi-name> </resource-ref> <!-- jboss-web.xml doesn't have a way of passing in context params --> </jboss-web>
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.
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="http://www.jboss.org/ironjacamar/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd"> <datasource jndi-name="java:jboss/datasources/TaskrDS" pool-name="TaskrDS" enabled="true" use-java-context="true"> <connection-url>jdbc:h2:mem:TaskrDB;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url> <driver>h2</driver> <security> <user-name>sa</user-name> <password>sa</password> </security> </datasource> </datasources>
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"> <hornetq-server> <jms-destinations> <jms-queue name="QueueOne"> <entry name="java:jboss/exported/TestQueueOne"/> <durable>true</durable> </jms-queue> <jms-topic name="TopicOne"> <entry name="java:jboss/exported/TestTopicOne"/> </jms-topic> </jms-destinations> </hornetq-server> </messaging-deployment>