How do I use connection pooling with tjdbcConnection?

One Star

How do I use connection pooling with tjdbcConnection?

Dear talend forums,
Sorry in advance for any confusion, I am a talend novice.
I am looking to use a connection pool to access my database (H2) with a tjdbcInput component.
Under tjdbcConnection "there is a specify datasource alias" checkbox, which I then check and specify a name.
I then create a datasource.xml file which specifies connection pool parameters.
Where do I put this file? At what point does talend runtime read this?
Thank you very much, Jason
Highlighted
Employee

Re: How do I use connection pooling with tjdbcConnection?

just put your datasource.xml into deploy folder of your runtime container and talend runtime instantiate datasource for you.
after that you can deploy your job with tJDBC* component.
One Star

Re: How do I use connection pooling with tjdbcConnection?

Thank you very much for replying.
Do I need to reference the bean in the talend job anywhere?
I have made the data source XML and put it in the deploy folder. My XML file looks like
<bean>
...
</bean>
<service ref="dataSource" interface="javax.SQL.data source">
<service-properties>
<entry key="OSGi.jndi.service.name value="datasource-h2">
</service a properties>
</service>
In my tjdbc component I checked "specify a data source alias" and wrote datasource-h2.
Am I missing anything else? I still get a " waiting for dependencies OSGi.jndi.service.name=datasource-h2."
Thank you very much!
One Star

Re: How do I use connection pooling with tjdbcConnection?

Try in lower case: key="osgi.jndi.service.name"

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch