Chapter 10. Configuration Sources

Configuration File
Alternative Configuration Sources
Priorities of Configuration Sources

Once installed, CloverETL Server requires a configuration of essential (database connection, license, sandboxes) and optional (SMTP, LDAP, etc.) features. The configuration is done by specifying configuration properties in a [property-key]=[property-value] format.

[Important]Important

The configuration might contain sensitive data; therefore, CloverETL Server enables you to encrypt the configuration properties (for more information, see Chapter 14, Secure Configuration Properties).

CloverETL can load the configuration properties from several sources. We recommend the easiest, most convenient way:

Configuration File

The cloverServer.properties configuration file is a text file which contains all CloverETL settings. You can edit the file either manually or using a much simpler and intuitive Setup GUI.

Example of configuration file's content for MySQL database:

# Modify the url, username and password for your environment.
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://hostname:3306/clover?useUnicode=true&characterEncoding=utf8
jdbc.username=user
jdbc.password=pass
jdbc.dialect=org.hibernate.dialect.MySQLDialect

The path to the file can be specified by system property, context parameter or environment variable.

We recommend specifying the path with the clover.config.file system property.

Example for Apache Tomcat:

Edit bin/setenv.sh (or bin\setenv.bat) and add -Dclover.config.file=/absolute/path/to/cloverServer.properties to CATALINA_OPTS.

For more information and examples on the supported application containers, see the Specifying the Path to the Configuration File section below.

Alternative Configuration Sources

There are other sources of configuration properties, as well. Each source containing the configuration data has a different priority. If a property isn't set, application's default setting is used.

[Warning]Warning
Combining configuration sources could lead to a confusing configuration which would make maintenance much more difficult.
  • Environment Variables

    Environment variables are variables configured by means of your operating system (e.g. $PATH is an environment variable).

    Set an environment variable with the clover. prefix, i.e. (clover.config.file).

    Some operating systems may not use a dot (.) character, so underlines (_) may be used instead of dots. So the clover_config_file name works as well.

  • System Properties

    System properties are configured by means of JVM, i.e. with the -D argument (-Dclover.config.file).

    Set a system property with the clover. prefix, i.e. (clover.config.file).

    Underlines (_) may be used instead of dots (.) so the clover_config_file name works as well.

  • Configuration File on Default Location

    A text file containing configured CloverETL properties. By default, CloverETL searches for the file on the [workingDir]/cloverServer.properties path.

  • Modification of Context Parameters in web.xml

    This way isn't recommended, since it requires a modification of the WAR file, but it may be useful when none of the approaches above are possible.

    Unzip clover.war and modify the WEB-INF/web.xml file. Add the following piece of code into the file:

    <context-param>
        <param-name>[property-name]</param-name>
        <param-value>[property-value]</param-value>
    </context-param>

  • Context Parameters (Available on Apache Tomcat)

    Some application servers allow you to set context parameters without modification of the WAR file.

    This way of configuration is possible, but it is not recommended, as Apache Tomcat may ignore some context parameters in some environments. Using configuration file is almost as convenient and much more reliable.

    Example for Apache Tomcat:

    On Tomcat, it is possible to specify context parameters in a context configuration file [Tomcat_home]/conf/Catalina/localhost/clover.xml which is created automatically just after deployment of a CloverETL Server web application.

    You can specify a property by adding this element:

    <Parameter name="[propertyName]" value="[propertyValue]" override="false" />

Priorities of Configuration Sources

Configuration sources have the following priorities (from the highest to lowest):

  1. Context parameters

    Context parameters are specified in an application server or directly in a web.xml file (not recommended).

  2. External configuration file

    The path to the external configuration file can be specified in several ways. CloverETL Server attempts to find the file in this order (only one of them is loaded):

    1. path specified with a config.file context parameter;

    2. path specified with a clover_config_file or clover.config.file system property (recommended);

    3. path specified with a clover_config_file or clover.config.file environment variable;

    4. default location ([workingDir]/cloverServer.properties).

  3. System properties

  4. Environment variables

  5. Default values

Specifying the Path to the Configuration File

Setup uses the configuration file to save the server's settings. The path to the file is specified by the clover.config.file system property. Each application server has a different way to configure the path:

  • Apache Tomcat

    Edit bin/setenv.sh (or bin/setenv.bat) and add -Dclover.config.file=/absolute/path/to/cloverServer.properties to CATALINA_OPTS.

    See also Apache Tomcat.

  • Jetty

    Edit bin/jetty.sh and add -Dclover.config.file=/absolute/path/to/cloverServer.properties to JAVA_OPTS.

    See also Jetty.

  • GlassFish

    Add the clover.config.file property in application server GUI (accessible on http://localhost:4848). The property can be added under ConfigurationSystem Properties.

    See also GlassFish / Sun Java System Application Server.

  • JBoss Application Server

    Edit the file [JBoss_AS_home]/bin/run.sh (JBoss AS v 6.x.x) or standalone.sh (JBoss AS v 7.x.x). and add the following line:

    export JAVA_OPTS="$JAVA_OPTS -Dclover.config.file=/absolute/path/to/cloverServer.properties" 

    See also JBoss Application Server.

  • JBoss Enterprise Application Platform

    Edit the configuration file /standalone/configuration/standalone.xml and 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>

    See also JBoss Enterprise Application Platform.

  • IBM WebSphere

    1. Go to Integrated Solutions Console (default URL:http://localhost:9060/ibm/console/).

    2. Go to ServersWebSphere application servers[Server_name]Java and Process ManagementProcess DefinitionJava Virtual MachineCustom Properties.

    3. Create a system property named clover_config_file whose value is a full path to the properties file (e.g. cloverServer.properties) on your file system.

    See also IBM WebSphere.

  • Weblogic

    Set JAVA_OPTIONS variable in the WebLogic domain start script [domainHome]/startWebLogic.sh

    JAVA_OPTIONS="${JAVA_OPTIONS} -Dclover_config_file=/path/to/clover-config.properties

    See also Oracle WebLogic Server.