You are here

Configuring JBoss for Alfresco

This section describes how to configure an Alfresco installation on JBoss.
These steps assume that you know the path of the JBoss directory, which is represented as <JBOSS_EAP_HOME>.
  1. Install the JDBC driver for MySQL database.
    1. To install the required JDBC driver as a core module, create the <JBOSS_EAP_HOME>\modules\com\mysql\main directory.
    2. Copy the JDBC driver, mysql-connector-java-5.1.20-bin.jar to <JBOSS_EAP_HOME>\modules\com\mysql\main.
    3. Create the <JBOSS_EAP_HOME>\modules\com\mysql\main\module.xml file with the following contents:

      <?xml version="1.0" encoding="UTF-8"?>
        <module xmlns="urn:jboss:module:1.0" name="com.mysql">
           <resource-root path="mysql-connector-java-5.1.20-bin.jar"/>
           <module name="javax.api"/>
  2. Configure the MySQL datasource resource in the server subsystem.

    Modify the subsystem datasources in the <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml file to have the following content:

    <subsystem xmlns="urn:jboss:domain:datasources:1.1">
        <datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true">
            <driver name="com.mysql" module="com.mysql">
    Note: If Alfresco is deployed with MS SQL Server, set SNAPSHOT transaction isolation level by adding the following to the subsystem datasources:
    <new-connection-sql>SET TRANSACTION ISOLATION LEVEL SNAPSHOT;</new-connection-sql>

    Ensure that ALLOW_SNAPSHOT_ISOLATION database option is set to ON.

  3. (Optional): Configure another datasource for Activit's ID-generator that is used in activiti-context.xml (recommended for production). For simplicity, we will reuse MySqlDS defined above.
  4. Unzip alfresco-enterprise-4.2.7.ear and check/modify the WEB-INF\jboss-web.xml file to have correct references to the main data source (in this example, it is MySqlDS, which is defined in standalone.xml) and to activitiIdGeneratorDataSource (used in activiti-context.xml):

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE jboss-web PUBLIC"-//JBoss
    //DTD Web Application 4.2//EN"
  5. Copy vaadin-application-server-class-loader-workaround-1.0.1.jar from <TEMP>\web-server\lib to <ALFRESCO_HOME>\WEB-INF\lib of the unzipped alfresco-enterprise-4.2.7.ear.

    Note: <TEMP> refers to the path of the temporary directory.
  6. Configure logging.
    1. (For Windows): In <JBOSS_EAP_HOME>\bin\standalone.conf.bat, add the following to JAVA_OPTS.

      set "JAVA_OPTS=%JAVA_OPTS%"

      (For Unix/Linux): In <JBOSS_EAP_HOME>/bin/standalone.conf, add the following to JAVA_OPTS:

    2. Modify logging subsystem in <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml.

      • Change the default level for <root-logger> from INFO to ERROR in <subsystem xmlns="urn:jboss:domain:logging:1.3">.
      • Add the logger elements as children to <subsystem xmlns="urn:jboss:domain:logging:1.3”> with logging configuration taken from alfresco-enterprise-4.2.7.ear\alfresco.war\WEB-INF\classes\
      Note: For more information on logging mapping elements, see JBoss logging.
  7. Set appropriate memory values for –Xms, -Xmx, -XX:MaxPermSize and other JVM options in:

    • <JBOSS_EAP_HOME>\bin\standalone.conf.bat (For Windows platform) or
    • <JBOSS_EAP_HOME>/bin/standalone.conf (For Unix/Linux OS).
  8. Configure URI_ENCODING with UTF-8. Set the following system properties in standalone.xml after extensions tag:

     <property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
     <property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
  9. Disable the JBoss webservices subsystem as it conflicts with Alfresco CMIS. The following lines should be removed from <JBOSS_EAP_HOME>\standalone\configuration\standalone.xml:

    <extension module=""/>
    <subsystem xmlns="urn:jboss:domain:webservices:1.2">
        <endpoint-config name="Standard-Endpoint-Config"/>
        <endpoint-config name="Recording-Endpoint-Config">
          <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
            <handler name="RecordingHandler" class=""/>
  10. Compress alfresco.war and alfresco-enterprise-4.2.7.ear to include the changes made.
  11. Start the standalone JBoss server.
  12. Set the server's IP address in the JBoss Management Console.
    1. Open the JBoss Management Console.
    2. Set the server's IP address in Profiles > General Configurations > Interfaces > Network Interfaces > Available Interfaces.
  13. Set the server's IP address in all the corresponding Alfresco configuration files, including
  14. Deploy Alfresco.
    1. Open the JBoss Management Console.
    2. Navigate to Runtime > Manage Deployments.
    3. Click the Add button.
    4. Browse and select the modified alfresco-enterprise-4.2.8.ear file.
    5. After the EAR file is added, click the Enable button.
Alfresco is successfully deployed.
Note: Oracle JMX is not supported when using JBoss EAP. This is a known issue; see JBoss issue AS7-1859. Alfresco recommends that you use JBoss JMX instead. For information on how to connect to the JBoss AS7 JMX MBeanServer from jconsole, see the JBoss Developer documentation.