Construct DBConnection from java.sql.DataSource?

Reading the CloverETL Javadoc, I don’t see a way to construct an org.jetel.connection.jdbc.DBConnection from a javax.sql.DataSource.

I’d like to invoke the CloverETL engine from a Java class, but I’d like to use a javax.sql.DataSource as, well, my datasource. From the javaDoc, it seems that the only way to construct an org.jetel.connection.jdbc.DBConnection is by passing a java.util.Properties instance or a config filename.

What am I doing wrong?

Thanks.

Hello,
as you’ve written, database connection can be built in from properties or properties file. But there are two ways to connect to database: with jdbc driver or with data source. In the second case you need to provide jndi name; that means that properties or property file must contain at least one property - jndiName. Clover will find the data source when trying to connect to database.