Version

    Open Liberty

    This example shows how to deploy CloverDX Server into Open Liberty application server.

    First, go to the wlp directory and create a new Open Liberty server following the steps in the README.txt file. In this example, we will use "cloverServer" as the name of the server.

    bin/server create cloverServer

    Then navigate to usr/servers/cloverServer:

    • Put your clover.war into the apps directory.

    • Create a lib directory and put your JDBC driver and other required libraries there.

    • Create a jvm.options file for custom command-line arguments passed to the JVM.

    • Adjust memory allocation limits in jvm.options , see

    • Create a clover.properties file and add it to the jvm.options file:

      -Dclover.config.file=/absolute/path/to/clover.properties
    • Set the JAVA_HOME environment variable in the server.env file.

      JAVA_HOME=/usr/java/default
    • If you need to set additional environment variables, put them also into server.env.

    • Modify your server.xml file as follows:

    Example 1. Open Liberty - server.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <server description="CloverDX Server">
    
        <!-- Enable features -->
        <featureManager>
            <feature>jsp-2.3</feature>
            <feature>jndi-1.0</feature> <!-- Required if you use a JNDI data source, see below. -->
            <feature>jdbc-4.2</feature> <!-- Required if you use a JNDI data source, see below. -->
        </featureManager>
    
        <!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
        <httpEndpoint id="defaultHttpEndpoint"
                      httpPort="9090"
                      httpsPort="-1"
                      host="*" >
        </httpEndpoint>
    
        <!-- JDBC drivers and other required libraries -->
        <library id="clover-lib" apiTypeVisibility="+third-party">
            <fileset dir="${server.config.dir}/lib" includes="*.jar" />
        </library>
    
        <!-- Use "parentLast" classloader delegation -->
        <webApplication contextRoot="clover" location="clover.war" >
            <classloader delegation="parentLast" commonLibraryRef="clover-lib" />
        </webApplication>
    
        <!--
            Uncomment the code below to set up a database connection as a JNDI data source.
            Make sure to enable the "jndi-1.0" and "jdbc-4.2" features above.
            See also https://openliberty.io/docs/latest/reference/config/dataSource.html
        -->
        <!--
        <dataSource jndiName="jdbc/CloverDB">
            <jdbcDriver libraryRef="clover-lib"/>
            <properties.postgresql URL="url"
                        user="usr"
                        password="pwd" />
        </dataSource>
        -->
    
        <!-- Optional, hide "The manifest class path can not be found" warnings. -->
        <!-- <logging hideMessage="SRVE9967W" /> -->
    
        <!-- Automatically expand WAR files and EAR files -->
        <applicationManager autoExpand="true"/>
    
        <!-- Default SSL configuration enables trust for default certificates from the Java runtime -->
        <ssl id="defaultSSLConfig" trustDefaultCerts="true" />
    </server>