How do I use connection pooling with tjdbcConnection?

Highlighted
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
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 Summer ’19

Watch the recorded webinar!

Watch Now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download