How to define threadSafeConnection=false in JNDI

Hi I am using JNDI look up to define connection configuration for clover.
How do i define threadSafeConnection=false property in JNDI?
I was trying
<Resource name=“jdbc/db” auth=“container”
type=“oracle.jdbc.pool.OracleDataSource”
driverClasName=“oracle.jdbc.driver.OracleDriver”
factory=“oracleSourceFactory”
user=“xxx”
password=“xxx”
url=“xxxx”
threadSafeConnection=“false”

Hi varkashy,

“threadSafeConnection=false” in database connection definition means: “all components share one JDBC connection”. So from connection definition only one JDBC connection is instantiated. When set to true, each component gets own instantiated JDBC connection.

If you set connection via JNDI, CloverETL has no chance to “clone” this connection. So it basically works in “threadSafeConnection=false” mode automatically.

I hope this helps.

Yes that was my idea too but this doesnt seem to working
if i dont define threadSafeConnection=false in config file language trabsformations for etl graphs is failing.

I thought same. But its now working for me. Basically its creating new connection everytime.
Is there a way to define thread safe =false in JNDI?
Or will it work if i use implicit caching at set connection =1?

Hi varkashy,

attribute “threadSafeConnection” is independent of the way how clover obtains DB connections.
Thus you can configure JNDI Datasource in your app-container e.g. like this:


The JNDI Datasource defined on app-container level specifies HOW the connection is created when the clover asks for it.

However the clover DB connection config specifies how clover handle the obtained connection, so you can set the threadSafeConnection=“false” there.
it may look e.g. like this:

(if it’s external config, it may be .cfg file with corresponding keys)

Thank You

This option works.
I was just looking for a way to define this in XML…