There are several sources of configuration properties. If a property isn't set, application's default setting is used.
Configuration properties can be encrypted (see details in Chapter 10, Secure Configuration Properties).
Warning: Do not combine sources specified below. Configuration becomes confusing and maintenance will be much more difficult.
Environment variables are variables configured by means of your operating system.
E.g. $PATH
is an environment variable.
Set environment variable with prefix
clover.
, i.e.
(clover.config.file
)
Some operating systems may not use dot (.
) character, so underlines (_
) may be used instead of dots.
So the clover_config_file
name works as well.
System properties are configured by means of JVM,
e.g. with -D
argument (-Dclover.config.file
).
Set system property with
clover.
prefix, i.e.
(clover.config.file
)
Underlines (_
) may be used instead of dots (.
) so the clover_config_file
name works as well.
Source is a common properties file (text file with key-value pairs):
[property-key]=[property-value]
By default, CloverETL tries to find the config file
on the
[workingDir]/cloverServer.properties
path.
A file has the same file structure as in the case above,
but its location is specified in the clover_config_file
or with a clover.config.file
environment variable or system property.
This is the recommended way of configuration if context parameters cannot be set in the application server.
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>
This way isn't recommended, but it may be useful when none of the approaches above are possible.
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. Use of a properties file is almost as convenient and much more reliable way.
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" />
Configuration sources have these priorities:
context parameters (specified in an application server or
directly in a web.xml
file);
external config file; CS tries to find it in this order. Only one of them is loaded:
path specified with a config.file
context parameter;
path specified with a clover_config_file
or
clover.config.file
system property;
path specified with a clover_config_file
or
clover.config.file
environment variable;
default location
([workingDir]/cloverServer.properties
);
system properties;
environment variables;
default values.
Note | |
---|---|
Continue with: Chapter 8, Examples of DB Connection Configuration |