<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: setting up JDBC connection pool in Talend ESB container in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251043#M35100</link>
    <description>&lt;P&gt;The best way to create multiple connection pools is to use pax-jdbc-pool-dbcp2, do the following, ensure talend is running:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;create a datapool configuration file under runtimePath/container/etc/org.ops4j.datasource-db_your_data_source_name.cfg&lt;/LI&gt; 
 &lt;LI&gt;Update the file accordingly:&amp;nbsp; 
  &lt;OL&gt; 
   &lt;LI&gt;&lt;PRE&gt;osgi.jdbc.driver.name=mysql
pool=dbcp2
xa=true
databaseName=your_database_name
user=your_database_userName
password=your_database_username_password
dataSourceName=your_data_source_name
jdbc.pool.maxTotal=8&lt;/PRE&gt;&lt;/LI&gt; 
   &lt;LI&gt;note in this approach you can name your data source anything and not for example "&lt;SPAN&gt;ds-mysql"&lt;/SPAN&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;Note in the tesb.log that the file has been loaded&amp;nbsp;&lt;PRE&gt;2019-01-10T18:16:00,636 | INFO  | fileinstall-XXXXX/TOS_ESB-20180116_1512-V6.5.1/Runtime_ESBSE/container/etc | install.internal.Util$OsgiLogger  205 | 8 - org.apache.felix.fileinstall - 3.5.8 | Creating configuration from org.ops4j.datasource-db_&lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;.cfg&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;go into the talend client i.e ./client in the container/bin folder&lt;/LI&gt; 
 &lt;LI&gt;execute the following commands:&lt;PRE&gt;feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.0.0/xml/features
feature:install transaction jndi pax-jdbc-mysql pax-jdbc-config pax-jdbc-pool-dbcp2&lt;/PRE&gt; 
  &lt;OL&gt; 
   &lt;LI&gt;in the above I am using mysql "pax-jdbc-mysql" should you require another database the following options can be used: 
    &lt;OL&gt; 
     &lt;LI&gt;pax-jdbc-oracle&lt;BR /&gt;pax-jdbc-db2&lt;BR /&gt;pax-jdbc-derby&lt;BR /&gt;pax-jdbc-derbyclient&lt;BR /&gt;pax-jdbc-h2&lt;BR /&gt;pax-jdbc-hsqldb&lt;BR /&gt;pax-jdbc-jtds&lt;BR /&gt;pax-jdbc-mariadb&lt;BR /&gt;pax-jdbc-mssql&lt;BR /&gt;pax-jdbc-mysql&lt;BR /&gt;pax-jdbc-postgresql&lt;BR /&gt;pax-jdbc-sqlite&lt;BR /&gt;pax-jdbc-teradata&lt;/LI&gt; 
    &lt;/OL&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;Confirm that the datasource has been created by executing&amp;nbsp; service:list javax.sql.DataSource&lt;PRE&gt;[javax.sql.DataSource]
----------------------
 service.factoryPid = org.ops4j.datasource
 felix.fileinstall.filename = file:/XXX/Runtime_ESBSE/container/etc/org.ops4j.datasource-db_&lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;.cfg
 service.pid = org.ops4j.datasource.9d02b595-6315-49f3-9ed4-17537e99b126
 Jdbc.pool.maxTotal = 8
 password = password
 databaseName = databaseName
 user = user
 osgi.jndi.service.name = &lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;
 dataSourceName = &lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;
 osgi.jdbc.driver.name = mysql
 service.id = 491
 service.bundleid = 271
 service.scope = singleton
Provided by : 
 OPS4J Pax JDBC Config (271)&lt;/PRE&gt;&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Should you wish to create a second connection pool merely create a new configuration file to each database you are trying to connect to, ensure that the&amp;nbsp;osgi.jdbc.driver.name is set to the correct database. Be sure to set your alias name in your db connector in the studio to what the&amp;nbsp;dataSourceName name is in your configuration file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;The instructions for creating an oracle connection are somewhat different, S&lt;SPAN&gt;ince the oracle driver is neither in maven central or an osgi bundle.&amp;nbsp;&lt;/SPAN&gt;Before executing&amp;nbsp;pax-jdbc-oracle in step 5 you will need to perform the following:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;You will need to download the&amp;nbsp;ojdbc oracle Jar and copy it to you deployment environment&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;execute the following command:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;bundle:install wrap:file:/path_to_download/ojdbc-7.jar\$Bundle-SymbolicName=oracle.jdbc&amp;amp;Bundle-Version=1.0&amp;amp;Bundle-Name='JDBC Driver for Oracle'&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;The above command is tricky to get right since if you have made an error you will not get anything in the logs. Execute the list command in the talend client in order to determine if the driver has been installed.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2019-01-24 17-23-59.png" style="width: 595px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1tK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140131i761112D446113671/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1tK.png" alt="0683p000009M1tK.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Once this is complete you can then install the pax driver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;feature:install pax-jdbc-oracle&lt;/PRE&gt;&lt;/LI&gt; 
&lt;/OL&gt;</description>
    <pubDate>Thu, 10 Jan 2019 16:41:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-01-10T16:41:19Z</dc:date>
    <item>
      <title>setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251038#M35095</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm trying to setup my REST services jobs to use JDBC connection pooling when deployed on Talend ESB runtime (Karaf).&lt;/P&gt; 
&lt;P&gt;I've followed the instructions in the documentation guide &lt;A href="https://help.talend.com/display/TalendESBContainerAdministrationGuide62EN/5.+Using+datasources+and+connection+pooling+in+Talend+Runtime" target="_self" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;From the docs I've run the following:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;place the SQL Server JDBC driver in ./runtime/deploy/sqljdbc42.jar&lt;/LI&gt; 
 &lt;LI&gt;feature:install tesb-datasource-sqlserver&lt;/LI&gt; 
 &lt;LI&gt;feature:list | grep sqlserver &amp;nbsp;&lt;BR /&gt;tesb-datasource-sqlserver | 6.2.1 | x | Started | tesb-6.2.1 |&lt;/LI&gt; 
 &lt;LI&gt;edited ./runtime/etc/org.talend.esb.datasource.sqlserver.cfg&amp;nbsp;&lt;BR /&gt;dataSource.url=jdbc:sqlserver://MYHOST:1433;databaseName=MYDB&lt;BR /&gt;dataSource.user=MYUSER&lt;BR /&gt;dataSource.password=MYPASS&lt;BR /&gt;datasource.pool.maxActive=20&lt;BR /&gt;datasource.pool.maxIdle=5&lt;BR /&gt;datasource.pool.maxWait=30000&lt;/LI&gt; 
 &lt;LI&gt;Actually I'm not sure where the JDBC Driver class name is set above! It should be "com.microsoft.sqlserver.jdbc.SQLServerDriver". Anyway!&lt;/LI&gt; 
 &lt;LI&gt;bundle:list | grep MSSQL&lt;BR /&gt;355 | Active | 80 | 0.8.0 | OPS4J Pax JDBC MSSQL Driver Adapter&lt;/LI&gt; 
 &lt;LI&gt;bundle:refresh 355&lt;/LI&gt; 
 &lt;LI&gt;bundle:restart 355&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;Now, I have a job that sets the data source alias on my MSSQLServerConnection:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sqlserver-1.png" style="width: 454px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Ltbd.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128467i72A5B8A2E2322E5E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Ltbd.png" alt="0683p000009Ltbd.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But when I deploy my job, the bundle stays in "GracePeriod" state.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I look at the logs I see that the job is waiting on a dependency with the following error message:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2017-05-04 18:25:59,919 | INFO | ool-491-thread-1 | BlueprintContainerImpl | 16 - org.apache.aries.blueprint.core - 1.6.1 | Bundle demo.rest1/0.5.0.SNAPSHOT is waiting for dependencies [(&amp;amp;(osgi.jndi.service.name=ds-sqlserver)(objectClass=javax.sql.DataSource))]&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What's the dependency feature that needs to be started??&lt;/P&gt; 
&lt;P&gt;I'm feeling Karaf has not started the ds-sqlserver connection pool!!!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:49:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251038#M35095</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251039#M35096</link>
      <description>&lt;P&gt;Follow up question... how do you set up multiple connection pools? for example how do you create a new or change "ds-sqlserver" pool?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 21:15:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251039#M35096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-04T21:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251040#M35097</link>
      <description>Follow up question... how do you set up multiple connection pools? for example how do you create a new or change "ds-sqlserver" pool?</description>
      <pubDate>Thu, 04 May 2017 21:16:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251040#M35097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-04T21:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251041#M35098</link>
      <description>&lt;P&gt;I do that not using tesb but pure Camel commands :&lt;/P&gt;
&lt;P&gt;Install the Camel JDBC feature&lt;/P&gt;
&lt;PRE&gt;feature:install jdbc&lt;/PRE&gt;
&lt;P&gt;Create a Datasource&lt;/P&gt;
&lt;PRE&gt;&amp;nbsp;jdbc:ds-create -url jdbc:oracle:thin:@//hostname:1521/dbname&amp;nbsp;-u login&amp;nbsp;-p password -dc oracle.jdbc.OracleDriver jdbc/sample&lt;/PRE&gt;
&lt;P&gt;Check you can list&amp;nbsp;it&lt;/P&gt;
&lt;PRE&gt;jdbc:ds-list&lt;/PRE&gt;
&lt;P&gt;Even test some SQL&lt;/P&gt;
&lt;PRE&gt;jdbc:query jdbc/sample select * from tablename&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 May 2017 10:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251041#M35098</guid>
      <dc:creator>vharcq</dc:creator>
      <dc:date>2017-05-16T10:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251042#M35099</link>
      <description>&lt;P&gt;Thanks so much for your reply&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000005Gt8aAAC"&gt;@vharcq&lt;/A&gt;. I actually got another solution as well but forgot to post it here.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here's the other solution I found:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I had to drop a Spring Bean XML config file into the Karaf deploy directory. Here's a sample Spring Bean configuration&amp;nbsp;for MySQL but it can easily be modified for SQL Server.&lt;/P&gt; 
&lt;P&gt;Edit this file based on your JDBC connection URL and drop it into the deploy directory of Karaf; afterwards you can use the connection name as the "alias" in your t****Connection component.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;

&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:osgi="http://www.springframework.org/schema/osgi"
  xmlns:context="http://www.springframework.org/schema/context"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&amp;gt;
  
	&amp;lt;!-- The Connection Pool --&amp;gt;
	&amp;lt;bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"&amp;gt;
		&amp;lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&amp;gt;
		&amp;lt;property name="url" value="jdbc:mysql://localhost/demo"/&amp;gt;
		&amp;lt;property name="username" value="talend"/&amp;gt;
		&amp;lt;property name="password" value="talend"/&amp;gt;
		&amp;lt;property name="initialSize" value="4"/&amp;gt;
		&amp;lt;property name="maxActive"  value="30"/&amp;gt;
		&amp;lt;property name="maxIdle" value="10"/&amp;gt;
		&amp;lt;property name="maxWait" value="3000"/&amp;gt;
		&amp;lt;property name="validationQuery" value="SELECT 1"/&amp;gt;
	&amp;lt;/bean&amp;gt;

	&amp;lt;!-- Publish the pool as an OSGi and JNDI Service --&amp;gt;
	&amp;lt;osgi:service interface="javax.sql.DataSource" ref="mysql-ds"&amp;gt;
		&amp;lt;osgi:service-properties&amp;gt;
			&amp;lt;entry key="osgi.jndi.service.name" value="mysql-ds"/&amp;gt;
		&amp;lt;/osgi:service-properties&amp;gt;
	&amp;lt;/osgi:service&amp;gt;
&amp;lt;/beans&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 18:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251042#M35099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T18:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251043#M35100</link>
      <description>&lt;P&gt;The best way to create multiple connection pools is to use pax-jdbc-pool-dbcp2, do the following, ensure talend is running:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;create a datapool configuration file under runtimePath/container/etc/org.ops4j.datasource-db_your_data_source_name.cfg&lt;/LI&gt; 
 &lt;LI&gt;Update the file accordingly:&amp;nbsp; 
  &lt;OL&gt; 
   &lt;LI&gt;&lt;PRE&gt;osgi.jdbc.driver.name=mysql
pool=dbcp2
xa=true
databaseName=your_database_name
user=your_database_userName
password=your_database_username_password
dataSourceName=your_data_source_name
jdbc.pool.maxTotal=8&lt;/PRE&gt;&lt;/LI&gt; 
   &lt;LI&gt;note in this approach you can name your data source anything and not for example "&lt;SPAN&gt;ds-mysql"&lt;/SPAN&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;Note in the tesb.log that the file has been loaded&amp;nbsp;&lt;PRE&gt;2019-01-10T18:16:00,636 | INFO  | fileinstall-XXXXX/TOS_ESB-20180116_1512-V6.5.1/Runtime_ESBSE/container/etc | install.internal.Util$OsgiLogger  205 | 8 - org.apache.felix.fileinstall - 3.5.8 | Creating configuration from org.ops4j.datasource-db_&lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;.cfg&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;go into the talend client i.e ./client in the container/bin folder&lt;/LI&gt; 
 &lt;LI&gt;execute the following commands:&lt;PRE&gt;feature:repo-add mvn:org.ops4j.pax.jdbc/pax-jdbc-features/1.0.0/xml/features
feature:install transaction jndi pax-jdbc-mysql pax-jdbc-config pax-jdbc-pool-dbcp2&lt;/PRE&gt; 
  &lt;OL&gt; 
   &lt;LI&gt;in the above I am using mysql "pax-jdbc-mysql" should you require another database the following options can be used: 
    &lt;OL&gt; 
     &lt;LI&gt;pax-jdbc-oracle&lt;BR /&gt;pax-jdbc-db2&lt;BR /&gt;pax-jdbc-derby&lt;BR /&gt;pax-jdbc-derbyclient&lt;BR /&gt;pax-jdbc-h2&lt;BR /&gt;pax-jdbc-hsqldb&lt;BR /&gt;pax-jdbc-jtds&lt;BR /&gt;pax-jdbc-mariadb&lt;BR /&gt;pax-jdbc-mssql&lt;BR /&gt;pax-jdbc-mysql&lt;BR /&gt;pax-jdbc-postgresql&lt;BR /&gt;pax-jdbc-sqlite&lt;BR /&gt;pax-jdbc-teradata&lt;/LI&gt; 
    &lt;/OL&gt;&lt;/LI&gt; 
  &lt;/OL&gt;&lt;/LI&gt; 
 &lt;LI&gt;Confirm that the datasource has been created by executing&amp;nbsp; service:list javax.sql.DataSource&lt;PRE&gt;[javax.sql.DataSource]
----------------------
 service.factoryPid = org.ops4j.datasource
 felix.fileinstall.filename = file:/XXX/Runtime_ESBSE/container/etc/org.ops4j.datasource-db_&lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;.cfg
 service.pid = org.ops4j.datasource.9d02b595-6315-49f3-9ed4-17537e99b126
 Jdbc.pool.maxTotal = 8
 password = password
 databaseName = databaseName
 user = user
 osgi.jndi.service.name = &lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;
 dataSourceName = &lt;SPAN&gt;your_data_source_name&lt;/SPAN&gt;
 osgi.jdbc.driver.name = mysql
 service.id = 491
 service.bundleid = 271
 service.scope = singleton
Provided by : 
 OPS4J Pax JDBC Config (271)&lt;/PRE&gt;&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Should you wish to create a second connection pool merely create a new configuration file to each database you are trying to connect to, ensure that the&amp;nbsp;osgi.jdbc.driver.name is set to the correct database. Be sure to set your alias name in your db connector in the studio to what the&amp;nbsp;dataSourceName name is in your configuration file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt; 
&lt;P&gt;The instructions for creating an oracle connection are somewhat different, S&lt;SPAN&gt;ince the oracle driver is neither in maven central or an osgi bundle.&amp;nbsp;&lt;/SPAN&gt;Before executing&amp;nbsp;pax-jdbc-oracle in step 5 you will need to perform the following:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;You will need to download the&amp;nbsp;ojdbc oracle Jar and copy it to you deployment environment&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;execute the following command:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;bundle:install wrap:file:/path_to_download/ojdbc-7.jar\$Bundle-SymbolicName=oracle.jdbc&amp;amp;Bundle-Version=1.0&amp;amp;Bundle-Name='JDBC Driver for Oracle'&lt;/PRE&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;The above command is tricky to get right since if you have made an error you will not get anything in the logs. Execute the list command in the talend client in order to determine if the driver has been installed.&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2019-01-24 17-23-59.png" style="width: 595px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1tK.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140131i761112D446113671/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1tK.png" alt="0683p000009M1tK.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt; 
 &lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;Once this is complete you can then install the pax driver&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;feature:install pax-jdbc-oracle&lt;/PRE&gt;&lt;/LI&gt; 
&lt;/OL&gt;</description>
      <pubDate>Thu, 10 Jan 2019 16:41:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251043#M35100</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-01-10T16:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251044#M35101</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLGyAAO"&gt;@Brian_Johnson&lt;/A&gt;&amp;nbsp;. Your instruction helped me a lot.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm using Oracle 12c and Talend 7.0.1.&lt;/P&gt; 
&lt;P&gt;I followed your instruction and had some problems with retrieving the connection from the pool.&lt;/P&gt; 
&lt;P&gt;When I used default configuration the pool was returning dbcp2.ManagedConnection and app was failing because it couldn't be cast to OracleConnection.&lt;/P&gt; 
&lt;P&gt;Started working for me when I configured pool to use dbcp2.BasicDataSource class without XA and specified jdbc driver class:&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;runtime/etc/org.ops4j.datasource-ds-oracle.cfg&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;pool=dbcp2&lt;BR /&gt;dataSource.class=org.apache.commons.dbcp2.BasicDataSource&lt;BR /&gt;dataSource.accessToUnderlyingConnectionAllowed=true&lt;BR /&gt;osgi.jdbc.driver.class=oracle.jdbc.OracleDriver&lt;BR /&gt;url=jdbc:oracle:thin:@HOST:PORT:SID&lt;BR /&gt;user=USER&lt;BR /&gt;password=PASSWORD&lt;BR /&gt;dataSourceName=ds-oracle&lt;BR /&gt;initialSize=2&lt;BR /&gt;jdbc.pool.maxTotal=20&lt;BR /&gt;jdbc.pool.maxIdle=10&lt;BR /&gt;jdbc.pool.minIdle=1&lt;BR /&gt;jdbc.pool.maxWaitMillis=10000&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I hope it helps someone. Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 22:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251044#M35101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-28T22:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251045#M35102</link>
      <description>&lt;P&gt;Good Afternoon Vald&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My apologies I should have put an example of an oracle connection. Below is the one I used.&amp;nbsp;You need to set the correct driver with xa = true in this case it is osgi.jdbc.driver.name=oracle&lt;/P&gt; 
&lt;PRE&gt;osgi.jdbc.driver.name=oracle
pool=dbcp2
xa=true
url=jdbc:oracle:thin:@HOST:PORT:SID&amp;amp;allowMultiQueries=true
databaseName=database_name
user=database_user
password=database_password
dataSourceName=db_C_P_Oracle_PAS
Jdbc.pool.removeAbandonedOnBorrow=true
Jdbc.pool.removeAbandonedTimeout=60
Jdbc.pool.defaultAutoCommit=true
Jdbc.pool.logAbandoned=true
pool.maxTotal=150
pool.minIdle=20
pool.maxIdle=50
pool.maxWaitMillis=10000
pool.minEvictableIdleTimeMillis=5000
pool.testOnBorrow=true
pool.testOnReturn=false
pool.timeBetweenEvictionRunsMillis=5000
Jdbc.factory.validationQuery=select 1
Jdbc.factory.defaultTransactionIsolation=2&lt;/PRE&gt; 
&lt;P&gt;Also here is a useful query in the talend client that you might be interested in after creating your connection pool&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;jdbc:ds-list&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251045#M35102</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-29T12:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251046#M35103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLGyAAO"&gt;@Brian_Johnson&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;P&gt;Thank you for sharing that config file. I will configure abandoned connections handling with my config same way you did.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I performed few more tests to turn on XA. Seems like XA works only with&amp;nbsp;&lt;SPAN&gt;osgi.jdbc.driver.name=oracle .&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;I'm able to create the datasource with the config you provided and it works in karaf, but I can't get the connection in talend job.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if I use&amp;nbsp;osgi.jdbc.driver.name=oracle and xa=true, the pool creates but the job errors out when trying to get the connection with message:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;java.lang.ClassCastException: org.apache.commons.dbcp2.managed.ManagedConnection cannot be cast to oracle.jdbc.OracleConnection
at pool_test_0_20.POOL_TEST.tDBInput_1Process(...)&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if I use&amp;nbsp;osgi.jdbc.driver.name=oracle without specifying&amp;nbsp;xa&amp;nbsp; the job errors out with message:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;java.lang.ClassCastException: org.apache.commons.dbcp2.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if I use osgi.jdbc.driver.class=oracle.jdbc.OracleDriver and xa=true&amp;nbsp; karaf fails to create datasource:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;org.ops4j.pax.jdbc.config - 1.1.0 | not supported - use a driver adapter org.ops4j.pax.jdbc.&amp;lt;subprotocol&amp;gt;
java.sql.SQLException: not supported - use a driver adapter org.ops4j.pax.jdbc.&amp;lt;subprotocol&amp;gt;&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;when I use osgi.jdbc.driver.class=oracle.jdbc.OracleDriver without&amp;nbsp;specifying&amp;nbsp;xa&amp;nbsp; it works fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Regarding checking the datasource, I can see my pool in jdbc:ds-list and jdbc:ds-info but it does not give much details.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Mbeans in runtime JVM give much more details and you can see real time what is happening to the datasource (i.e see number of active and idle connections and some stats). I'm using ViasualVM + mbeans browser plugin for that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Did you have a chance to perform some load tests and see that you can run 150 active connections? Any issues observed?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Kind Regards,&lt;/P&gt; 
&lt;P&gt;Vald&lt;/P&gt;</description>
      <pubDate>Sat, 02 Nov 2019 02:54:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251046#M35103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-02T02:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251047#M35104</link>
      <description>&lt;P&gt;Good Afternoon Vald&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;We are running a little older version of Talend than you are. I don't know if you tried newer versions of&amp;nbsp;pax-jdbc-features, we run on version 1.0.0 and I just checked on maven central and I see they are now on version 1.4 so it might be something to look into. We have ran load tests on this and the connection speeds are good as well as the pool maintaining its size as connections are returned. Keep in mind you must close the connections inside your Talend Job or the connection will not be returned to the pool and you will get a pool leak. Additionally when load is dropped the pool size will drop accordingly based on your&amp;nbsp;pool.minEvictableIdleTimeMillis setting. All in all we are very happy with its performance considering that we have 2 connection pools in one of our deployments, one to a MySQL db and another to an oracle db. We have some deployment where we have up to 3 connection pools and we have still not seen any degradation.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;That said there are more efficient connection pools supported in PAX JDBC. We really tried to get&amp;nbsp;&lt;SPAN&gt;hikari working but unfortunately&amp;nbsp;had to abandon&amp;nbsp;this. As I'm sure you probably&amp;nbsp;know documentation is very scarce in this arena so you have my sympathy. (So if you get that one to work would be very keen to see how)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thank you kindly for sharing&amp;nbsp;ViasualVM will definitely&amp;nbsp;have a look at this.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Wishing you all the best in your endeavour&amp;nbsp;here.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Nov 2019 16:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251047#M35104</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-03T16:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: setting up JDBC connection pool in Talend ESB container</title>
      <link>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251048#M35105</link>
      <description>&lt;P&gt;Hi @Brian Johnson​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Used your instructions above to install connection pooling for a SQL Server instance running the Talend Runtime 7.3.1 Open Source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So helpful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 15:12:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/setting-up-JDBC-connection-pool-in-Talend-ESB-container/m-p/2251048#M35105</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2021-06-14T15:12:01Z</dc:date>
    </item>
  </channel>
</rss>

