Managing the connection pool via Tomcat

Talend Big Data Platform Installation Guide for Linux

EnrichVersion
6.5
EnrichProdName
Talend Big Data Platform
task
Installation and Upgrade
EnrichPlatform
Talend Identity and Access Management
Talend Data Stewardship
Talend SAP RFC Server
Talend DQ Portal
Talend JobServer
Talend Administration Center
Talend Log Server
Talend Studio
Talend Artifact Repository
Talend Installer
Talend CommandLine
Talend Repository Manager
Talend Activity Monitoring Console
Talend Data Preparation
Talend Runtime

By default, a third-party application (c3p0) has been embedded into the configuration file of Talend Administration Center, to manage the connection pool.

The following procedure allows Tomcat to manage directly the connection pool. You can also apply this procedure to JBoss.

Procedure

  1. In the <ApplicationPath>/WEB-INF/classes folder, change the default setting of the configuration.properties file to:
    database.useContext=True
  2. In the WEB-INF folder, edit the web.xml file and add the following piece of code before the closing tag </web-app>:
    <resource-ref>
    
         <description>Our Datasource</description>
         <res-ref-name>jdbc/ADMINISTRATOR_CONNECTION</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
    
    </resource-ref>
  3. In the WEB-INF folder, edit the context.xml file and configure the parameters of connection to the database by modifying the following elements:

    Element name

    Value

    Note

    url

    jdbc:mysql://{ip_address}:3306/{db_name}

    For MySQL, where ip_address corresponds to the database IP address and db_name corresponds to its name.

    jdbc:oracle:thin:@{ip_address}:1521:{db_name}

    For Oracle, where ip_address corresponds to the database IP address and db_name corresponds to its name.

    jdbc:jtds:sqlserver://{ip_address}:1433/{db_name}

    For SQL Server, where ip_address corresponds to the database IP address and db_name corresponds to its name.

    jdbc:h2:file:{dir_path/}<db_name>;MVCC=TRUE;AUTO_SERVER=TRUE; LOCK_TIMEOUT=15000

    For H2, where dir_path corresponds to the database path and db_name corresponds to its name.

    username

    The username used to log in your database, talend_admin by default.

    password

    The password used to log in your database, talend_admin by default.

    driverClassName

    org.gjt.mm.mysql.Driver

    For MySQL.

    oracle.jdbc.driver.OracleDriver

    For Oracle.

    net.sourceforge.jtds.jdbc.Driver

    For SQL Server.

    org.h2.Driver

    For H2.

  4. Copy the relevant .jar file corresponding to the database in which your data is stored in <TomcatPath>/lib/.