Home | Table of Contents | JBoss Application Server | CloverETL 4.6.1
--- | --- | ---
Prev | Production Server | Next

### JBoss Application Server

Installation of JBoss AS
Installation of CloverETL Server
Configuration of CloverETL Server on JBoss AS

| Important
See Application Server in system requirements for currently supported JBoss AS versions and required Java versions. If you encounter any problems during the installation, the Possible Issues during Installation section may provide a solution.

#### Installation of JBoss AS

1. Download the JBoss AS release from the official download page.

   CloverETL Server is developed and tested with the JBoss AS 5, 6 and 7 containers. Running the Server with other versions may result in unpredictable behavior.

2. Extract the downloaded archive (`zip` or `tar.gz`).

3. Run JBoss AS.

   - Unix-like systems:

     - JBoss AS v 6.x.x

       `Run [JBoss_AS_home]/bin/run.sh`.

     - JBoss AS v 7.x.x

       `Run [JBoss_AS_home]/bin/standalone.sh`.

   - Windows system:

     - JBoss AS v 6.x.x

       `Run [JBoss_AS_home]\bin\run.bat`.

     - JBoss AS v 7.x.x

       `Run [JBoss_AS_home]\bin\standalone.bat`.

4. Check whether JBoss AS is running.

   - Open a new tab in your browser and type http://localhost:8080/ in the address bar.

     Figure 3.7. JBoss AS welcome page

#### Installation of CloverETL Server

1. Check if you meet the prerequisites:

   - Oracle JDK or JRE is installed (see Java Virtual Machine for the required Java version).

   - JAVA_HOME or JRE_HOME environment variable is set.

   - A supported version of JBoss AS is installed.

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

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

   - Unix-like systems:
     JBoss AS v 6.x.x

       Edit the `[JBoss_AS_home]/bin/run.conf`.

     JBoss AS v 7.x.x

       Edit the `[JBoss_AS_home]/bin/standalone.conf`.

     Edit the values of the following attributes:

         -XX:MaxMetaspaceSize=512m -Xms128m -Xmx2048m"

   - Windows system:
     JBoss AS v 6.x.x

       Edit the `[JBoss_AS_home]\bin\run.conf.bat`.

     JBoss AS v 7.x.x

       Edit the `[JBoss_AS_home]\bin\standalone.conf.bat`.

     Edit the values of the following attributes:

         -XX:MaxMetaspaceSize=512m -Xms128m -Xmx2048m"

3. Go to the download section of your CloverETL account and download the `clover.war` (web archive) file containing CloverETL Server for JBoss AS.

4. Create a separate JBoss server configuration.

   It may be useful to use a specific JBoss server configuration, when it is necessary to run CloverETL:

   - isolated from other JBoss applications

   - with a different set of services

   - with different libraries on the classpath than other applications

   See the JBoss manual for details about the JBoss server configuration: JBoss Server Configurations , Start the Server With Alternate Configuration

5. Configure database connection.

   As CloverETL Server's embedded Derby database does not work under JBoss AS, a database connection has to be always configured. We used MySQL accessed via JNDI-bound datasource in this example:

   - Create datasource deployment file `[JBoss_AS_home]/server/[serverConfiguration]/deploy/mysql-ds.xml`

         <datasources>
             <local-tx-datasource>
                 <jndi-name>CloverETLServerDS</jndi-name>
                 <connection-url>jdbc:mysql://localhost:3306/cloverServerDB</connection-url>
                 <driver-class>com.mysql.jdbc.Driver</driver-class>
                 <user-name>root</user-name>
                 <password>root</password>
             </local-tx-datasource>
         </datasources>

     | Note
     Special characters in the XML file have to be typed in as XML entities. For instance, ampersand "&" as "&amp;" etc.

     "CloverETLServerDS" is the name under which the datasource will be accessible. The thing to do here is to set database connection parameters ( `connection-url` , `driver-class` , `user-name` and `password` ) to the database. The database has to be empty before the first execution, the server creates its tables on its own.

   - Put the JDBC driver JAR file for your database to the application server classpath. In this example we copied the file `mysql-connector-java-5.1.5-bin.jar` to `[JBoss_AS_home]/server/[serverConfiguration]/lib`

6. Configure CloverETL Server according to the description in the next section .

7. Deploy the WAR file

   Copy `clover.war` to `[JBoss_AS_home]/server/[serverConfiguration]/deploy`

8. Start JBoss AS via `[JBoss_AS_home]/bin/run.sh` (or `run.bat` on Windows OS) If you want to run JBoss with a specific server configuration, it has to be specified as a parameter: `[JBoss_AS_home]/bin/run.sh -c [serverConfiguration]` If the serverConfiguration isn't specified, the "default" is used.

#### Configuration of CloverETL Server on JBoss AS

| Note
Default installation (without any configuration) does not work under JBoss AS. In order to be able to use the CloverETL Server, a working database connection is required.

For detailed configuration of CloverETL Server, use a properties file. Here you can configure various properties, including the connection to the database, username and password, path to the license file, private properties, number of active threads, clusters and much more (see Chapter 9, List of Properties and Chapter 30, Cluster Configuration). The file can be placed either on a default, or specified location.

Content of such a file (example with MySQL database):

    datasource.type=JNDI
    datasource.jndiName=java:/CloverETLServerDS
    jdbc.dialect=org.hibernate.dialect.MySQLDialect

`datasource.type`

  Indicates the server will use JNDI-bound datasource created in steps above.

`datasource.jndiName`

  Specifies where can the datasource be found in JNDI.

`jdbc.dialect`

  Set the dialect according to your database server ( Part III, “Configuration”).

##### 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`.

1. Create the `cloverServer.properties` file in a directory readable by JBoss AS. (If you need an example of connection to any of supported databases, see Chapter 8, Examples of DB Connection Configuration.)

2. Set system property (or environment variable) `clover.config.file` pointing to the config properties file.

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

   The simplest way is by setting a Java parameter:

   Unix-like systems:

   1. Edit the `[JBoss_AS_home]/bin/run.sh` file.

   2. Add the following line:

          export JAVA_OPTS="$JAVA_OPTS -Dclover.config.file=/home/clover/config/cloverServer.properties"

   Windows system:

   1. Edit the `[JBoss_AS_home]\bin\run.conf.bat` file.

   2. Add the following line to the section where options are passed to the JVM:

          set JAVA_OPTS=%JAVA_OPTS% -Dclover.config.file=C:\JBoss6\cloverServer.properties

   | Important
   Do not override other settings in the `JAVA_OPTS` property - i.e. memory settings described above.

3. Restart JBoss AS so that the changes take effect.

4. Check the CloverETL Server application is running:

   Server's console is accessible at http://localhost:8080/clover by default.

| Note
Continue with: Chapter 4, Postinstallation Configuration

Prev | Up | Next
GlassFish / Sun Java System Application Server | Home | Table of Contents | JBoss Enterprise Application Platform