Closed jlolling closed 6 years ago
Pax-jdbc works differently since 1.0.0. See https://ops4j1.jira.com/wiki/spaces/PAXJDBC/pages/119078914/Pooling+and+XA+support+in+1.0.0
Karaf 4.1.0 refers to the new pax-jdbc by default so you run into this problem. I just updating the Tutorial 6 (jdbc) to match the new pax-jdbc version.
Thanks dear Christian. I will asap rerun my attempt and follow step by step your guide - hoping it works now.
Closing this issue as I hope it is fixed
I can confirm, this description works also in the Talend Runtime 7.3.1 In the client I have installed these features:
> feature:repo-add pax-jdbc 1.3.0
> feature:install transaction jndi pax-jdbc-postgresql pax-jdbc-pool-dbcp2 pax-jdbc-config
Here an example of an postgresql datasource configuration file (org.ops4j.datasource-etlcontrol.cfg):
osgi.jdbc.driver.name=PostgreSQL JDBC Driver
pool=dbcp2
serverName=ubuntuserver.local
databaseName=etlcontrol
portNumber=5432
user=postgres
password=postgres
dataSourceName=jdbc/etlcontrol-ds
factory.defaultAutoCommit=true
factory.validationQuery=select current_date
pool.timeBetweenEvictionRunsMillis=60000
pool.minEvictableIdleTimeMillis=20000
pool.maxTotal=300
pool.maxIdle=300
Here the output of the list command:
tadmin@trun()> service:list DataSource
[javax.sql.DataSource]
----------------------
factory.defaultAutoCommit = true
pax.jdbc.managed = true
service.id = 724
pool.minEvictableIdleTimeMillis = 20000
service.bundleid = 281
service.scope = singleton
dataSourceName = jdbc/etlcontrol-ds
user = postgres
pool.timeBetweenEvictionRunsMillis = 60000
osgi.jdbc.driver.name = PostgreSQL JDBC Driver
pool.maxIdle = 300
portNumber = 5432
pool.maxTotal = 300
password = postgres
databaseName = etlcontrol
osgi.jndi.service.name = jdbc/etlcontrol-ds
serverName = ubuntuserver.local
factory.validationQuery = select current_date
service.factoryPid = org.ops4j.datasource
felix.fileinstall.filename = file:/Data/Talend/Studio/TOS_ESB-731/Runtime_ESBSE/container/etc/org.ops4j.datasource-etlcontrol.cfg
service.pid = org.ops4j.datasource.41513306-53b7-4d5d-915f-6057510f1035
Provided by :
OPS4J Pax JDBC Config (281)
Thanks for your help @cschneider !
I am not able to install a pooled DataSourceFactory. My steps: I have installed a fresh apache-karaf-4.1.0 Then I have started the container - works fine Then I have installed the features:
Unfortunately there is no database pool at all! I am very under pressure to solve this. It would be great to have a fixed documentation.