JBoss AS
JBoss AS (known as WildFly) is well known application server that is supported out-of-box.
Recommended is to hold configuration strictly as JBoss module. It not depends on the name (in this page we use xxx.openhub.conf for illustration), but on content.
Correct configuration defined in jboss-deployment-structure.xml is expected (it is located in src/main/application/META-INF directory of maven module with ear packaging).
<?xml version="1.0"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2"> <sub-deployment name="openhub.war"> <exclude-subsystems> <!-- disable JPA because we use JPA 2.1 --> <subsystem name="jpa"/> </exclude-subsystems> <exclusions> <module name="org.apache.log4j"/> <module name="org.apache.commons.logging"/> <module name="org.slf4j"/> <module name="javax.faces.api"/> <module name="org.jboss.logging"/> <!-- following two because of validation problems caused by incompatible JBoss libraries --> <module name="javaee.api"/> <module name="javax.validation.api"/> <module name="javax.persistence.api"/> <module name="org.hibernate"/> <module name="org.hibernate.validator"/> <module name="com.google.guava"/> <module name="org.joda.time"/> </exclusions> <dependencies> <!-- name of JDBC module definition, for example PostgreSQL, which contains JDBC driver --> <module name="postgresql.jdbc" export="true"/> <module name="javax.annotation.api" export="true"/> <module name="javax.ejb.api" export="true"/> <module name="javax.interceptor.api" export="true"/> <module name="org.jboss.modules" export="true"/> <!-- name of module that holds OpenHub external configuration --> <module name="xxx.openhub.conf" export="true"/> </dependencies> </sub-deployment> </jboss-deployment-structure>
Note: for Jboss EAP 7, some public modules were added, like jackson, see https://access.redhat.com/articles/2158031 for full list.Â
JBoss module (module.xml file) can look like follow:
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="xxx.openhub.conf"> <resources> <resource-root path="."/> </resources> </module>
which has to be located in <JBOSS_HOME>/modules/xxx/openhub.conf directory. Content of this directory holds module descriptor itself and also another files which are expected to be on classpath, for example logback.xml (or similar logging SLF4J platform configuration), openhub.properties, quartz.properties and so on.
 JBoss expects specific servlet path: in application.properties define server.servlet-path=/* (or via openhub.properties).
Maven plugin for auto-deployment
It is possible to use JBoss maven plugin for automatically deployment:
<plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>${jboss-as-plugin.version}</version> <configuration> <filename>openhub.ear</filename> </configuration> </plugin>
Datasource configuration:
Datasource can be configured the standard way, and let openhub use jndi resource:
spring.datasource.jndi-name=java:/jdbc/openhub
By default, jboss supplies transactionManager, which is autoconfigured by openhub. However in order to use it, spring jta must be disabled explicitely:
spring.jta.enabled=false