Version

    JBoss Enterprise Application Platform

    Installation of CloverDX Server on JBoss EAP
    Configuration of CloverDX Server on JBoss EAP
    [Important]Important

    Before installation, check the software requirements, currently supported JBoss EAP versions and required Java versions in the Software Requirements section.

    If you encounter any problems during the installation, see Chapter 10, Troubleshooting for a possible solution.

    Installation of CloverDX Server on JBoss EAP

    1. Download and install JBoss EAP from the official download page.

    2. It is strongly recommended to adjust the default limits for Memory allocation (see the Memory Settings section).

      You can set the initial and maximum memory heap size by adjusting the "Xms" and "Xmx" JVM parameters and classloaders memory limit by adjusting the "XX:MaxMetaspaceSize" parameter:

      For JBoss EAP standalone mode, follow these steps:

      • Unix-like systems:
        • Edit the [JBoss_EAP_home]/bin/standalone.conf file.

        • Add the following line:

          JAVA_OPTS="$JAVA_OPTS -XX:MaxMetaspaceSize=512m -Xms128m -Xmx2048m"
      • Windows systems:
        • Edit the [JBoss_EAP_home]\bin\standalone.conf.bat file.

        • JAVA_OPTS="$JAVA_OPTS -XX:MaxMetaspaceSize=512m -Xms128m -Xmx2048m"
    3. Go to the download section of your CloverDX account and download the clover.war (web archive) file containing CloverDX Server for JBoss EAP.

    4. Configure the database connection.

      By default, CloverDX Server uses an embedded Derby database; however, such setup is not supported for production use.

      You can use the database connection provided by JNDI-bound datasource deployed by JBoss EAP. In order to define the datasource, edit the file:

      [JBoss_EAP_home]/standalone/configuration/standalone.xml

      and add the definition of the datasource into the section <subsystem xmlns="urn:jboss:domain:datasources:1.1"> under the element <datasources>. Here is an example of datasource connecting to a MySQL database:

      <datasource jndi-name="java:jboss/datasources/CloverDX"
          pool-name="CloverDX-Pool" enabled="true">
          <connection-url>jdbc:mysql://localhost:3307/cloverServerDB</connection-url>
          <driver>com.mysql</driver>
          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
          <pool>
              <min-pool-size>5</min-pool-size>
              <max-pool-size>50</max-pool-size>
              <prefill>true</prefill>
          </pool>
          <security>
              <user-name>clover</user-name>
              <password>SecretPassword</password>
          </security>
          <statement>
              <prepared-statement-cache-size>32</prepared-statement-cache-size>
              <share-prepared-statements>true</share-prepared-statements>
          </statement>
      </datasource>
      <drivers>
          <driver name="com.mysql" module="mysql.driver">
              <driver-class>com.mysql.jdbc.Driver</driver-class>
          </driver>
      </drivers>
    5. The datasource definition references a module (mysql.driver) with the MySQL JDBC driver. Take the following steps to add the module:

      [Note]Note

      Under JBoss EAP, there are more options to set up CloverDX Server's database: along with JNDI-bound data source, it is possible to use the embedded Derby database or other supported database system specified in the CloverDX configuration file.

      In order to be able to connect to the database, you need to define a global module, so that the driver is available for the CloverDX web application - copying the driver to the lib/ext directory of the Server will not work. Such module is created and deployed in few steps (the example is for MySQL and module's name is mysql.driver):

      1. Create a directory [JBoss_EAP_home]/modules/mysql/driver/main (note that the directory path corresponds to module name mysql.driver)

      2. Copy the driver mysql-connector-java-5.1.5-bin.jar to the directory and create a file module.xml there with the following content:

        <?xml version="1.0" encoding="UTF-8"?>
        <module xmlns="urn:jboss:module:1.1" name="mysql.driver">
            <resources>
                <resource-root path="mysql-connector-java-5.1.5-bin.jar" />
            </resources>
            <dependencies>
                <module name="javax.api" />
            </dependencies>
        </module>
      3. Add the module to global server modules: in the case of the standalone JBoss EAP server they are defined in [JBoss_EAP_home]/standalone/configuration/standalone.xml. Add the module to the EE domain subsystem section:

        <subsystem xmlns="urn:jboss:domain:ee:1.1">
            <global-modules>
                <module name="mysql.driver" slot="main" />
            </global-modules>
            <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
            <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
        </subsystem>
    6. Configure CloverDX Server according to a description in the next section.

    7. Deploy WAR file.

      Copy the clover.war file to [JBoss_EAP_home]/standalone/deployments.

    8. To start the JBoss platform:

      • Unix-like systems:

        Run [JBoss_EAP_home]/bin/standalone.sh.

      • Windows system:

        Run [JBoss_EAP_home]\bin\standalone.bat.

      It may take a couple of minutes for all applications to start.

    9. Log in CloverDX Server.

      1. Type http://localhost:8080/clover in the browser.

      2. Activate the CloverDX Server.

      3. Use the default administrator credentials to access the web GUI:

        Username: clover

        Password: clover

    Configuration of CloverDX Server on JBoss EAP

    [Tip]Tip

    The default installation (without any configuration) is only recommended for evaluation purposes. For production use, at least a dedicated, system database and SMTP server configuration is recommended.

    For an easy configuration of CloverDX Server, use a Setup GUI in which you can configure various properties, including the connection to the database, username and password, path to the license file, private properties, Clusters and much more (see Chapter 17, List of Configuration Properties and Chapter 51, Cluster Configuration). We recommend you place the file in a specified location and specify the path to the file with a system property.

    Properties File in Specified Location

    The properties file is loaded from a location which is specified by the environment/system property clover_config_file or clover.config.file.

      • Create the cloverServer.properties file in a directory readable by JBoss EAP. (If you need an example of connection to any of the supported database systems, see Chapter 16, System Database Configuration.):

        datasource.type=JNDI
        datasource.jndiName=java:jboss/datasources/CloverDXServerDS
        jdbc.dialect=org.hibernate.dialect.MySQLDialect
        license.file=/home/clover/config/license.dat

        Do not forget to set a correct JDBC dialect according to your database server (Part III, “Configuration”). You can set the path to the license file, too.

      • Alternatively, you can set "JDBC" datasource.type and configure the database connection to be managed directly by CloverDX Server (provided that you have deployed proper JDBC driver module to the Server):

        datasource.type=JDBC
        jdbc.url=jdbc:mysql://localhost:3306/cloverServerDB
        jdbc.dialect=org.hibernate.dialect.MySQLDialect
        jdbc.driverClassName=com.mysql.jdbc.Driver
        jdbc.username=clover
        jdbc.password=SecretPassword
        license.file=/home/clover/config/license.dat
    1. Set the clover.config.file system property (or environment variable).

      It should contain the full path to the cloverServer.properties file created in the previous step.

      The simplest way to set the system property is to edit the configuration file [JBoss_EAP_home]/standalone/configuration/standalone.xml, and to add the following snippet just under the <extensions> section:

      <system-properties>
          <property name="clover.config.file" value="C:/jboss-eap-6.2/cloverServer.properties" />
      </system-properties>
    2. Restart JBoss EAP for the changes to take effect.

    3. Check the CloverDX Server application is running:

      By default, the Server's console is accessible at http://localhost:8080/clover.

    [Note]Note

    By default, JBoss EAP has enabled HTTP session replication. This requires session serialization that is not supported by CloverDX Server and produces lots of harmless errors in JBoss's console.

    To eliminate these errors, disable the session replication. Edit [jboss-home]/standalone/configuration/standalone.xml and comment out the whole <cache-container name="web" aliases="standard-session-cache"> block under the <subsystem xmlns="urn:jboss:domain:infinispan:1.5"> section.