You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by dpravin <pr...@gmail.com> on 2016/11/23 14:20:47 UTC

pax-jdbc-dbcp2 and connection pooling

Hi,

We are using pax-jdbc for managing database connections. My environment
details are

Jboss Fuse 6.2.1
pax-jdbc 0.10.0- SNAPSHOT
Oracle - 11.2.0.4.0

Installed following features from pax-jdbc,

>features:install transaction jndi pax-jdbc-oracle pax-jdbc-pool-dbcp2
pax-jdbc-config 

we have observed that if the database is restarted or there were some
network issues all connections in the pool are corrupted. They are not
re-initialized after the connectivity unless the container is restarted.
Appreciate if someone can help me resolve this issue.

My data source configuration for your reference,

dataSourceName = dsn
osgi.jndi.service.name = dsn
osgi.jdbc.driver.name = oracle-pool
url = jdbc:oracle:thin:@//<<servername>>:port/databasename
user = user
password = password
pool.initalSize = 1
pool.maxTotal = 2
pool.minIdle = 2

factory.validationQuery=select sysdate from dual

Thanks,
Pravin



--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: pax-jdbc-dbcp2 and connection pooling

Posted by dpravin <pr...@gmail.com>.
Hi Achim,

Here is link to the pull request.

https://github.com/ops4j/org.ops4j.pax.jdbc/pull/29


Thanks,
Pravin



--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048851.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: pax-jdbc-dbcp2 and connection pooling

Posted by Erwin Hogeweg <er...@me.com>.
Hi Pravin,

FWIW, I noticed that I (now) need:

jdbc.pool.maxTotal=2
jdbc.pool.maxIdle=2


Regards,

Erwin

> On Jan 17, 2017, at 2:24 PM, dpravin <pr...@gmail.com> wrote:
> 
> Hello Christian,
> 
> I started testing the new pax-jdbc today and found following issues during
> my testing with dbcp2,
> 
> Environment details are
> 
> Jboss Fuse 6.2.1
> pax-jdbc 0.10.0- SNAPSHOT
> Oracle - 11.2.0.4.0
> 
> Installed following features from pax-jdbc,
> 
>> features:install transaction jndi pax-jdbc-oracle pax-jdbc-pool-dbcp2
> pax-jdbc-config 
> 
> dataSourceName = dsn
> osgi.jndi.service.name = dsn
> osgi.jdbc.driver.name = oracle
> url = jdbc:oracle:thin:@//<<servername>>:port/databasename
> user = user
> password = password
> pool.initalSize = 1 
> pool.maxTotal = 2
> pool.minIdle = 2 
> 
> 
> Issues,
> 
> 1) If xa property is not added to config file or set to false - Registers
> datasource with same name twice and get following runtime error,
> 
> Error executing command: Multiple JDBC datasource found for dsn
> 
> 2) if xa=true, then it registers the datasource and able to use connections
> from pool.
> 
> 3) pool.initalSize = 1  - The property gives error in this version, however
> worked fine with earlier version.
> 
> 
> I will continue to test and share my findings.
> 
> 
> Thankws,
> Pravin
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4049266.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


Re: pax-jdbc-dbcp2 and connection pooling

Posted by dpravin <pr...@gmail.com>.
Hello Christian,

I started testing the new pax-jdbc today and found following issues during
my testing with dbcp2,

Environment details are

Jboss Fuse 6.2.1
pax-jdbc 0.10.0- SNAPSHOT
Oracle - 11.2.0.4.0

Installed following features from pax-jdbc,

>features:install transaction jndi pax-jdbc-oracle pax-jdbc-pool-dbcp2
pax-jdbc-config 

dataSourceName = dsn
osgi.jndi.service.name = dsn
osgi.jdbc.driver.name = oracle
url = jdbc:oracle:thin:@//<<servername>>:port/databasename
user = user
password = password
pool.initalSize = 1 
pool.maxTotal = 2
pool.minIdle = 2 


Issues,

1) If xa property is not added to config file or set to false - Registers
datasource with same name twice and get following runtime error,

Error executing command: Multiple JDBC datasource found for dsn

2) if xa=true, then it registers the datasource and able to use connections
from pool.

3) pool.initalSize = 1  - The property gives error in this version, however
worked fine with earlier version.


I will continue to test and share my findings.


Thankws,
Pravin






--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4049266.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: pax-jdbc-dbcp2 and connection pooling

Posted by Achim Nierbeck <bc...@googlemail.com>.
I'm missing the link to the PR in that Jira issue :)

regards, Achim


2016-11-23 20:33 GMT+01:00 Christian Schneider <ch...@die-schneider.net>:

> The major changes are done. The current state should be quite stable.
>
> If you have the chance I would really appreciate if you can give the
> snapshot
> a spin in your environment.
>
> Christian
>
>
> On 23.11.2016 16:03, dpravin wrote:
>
>> Hi Achim,
>>
>> I created Jira ticket/issue
>>
>> https://ops4j1.jira.com/projects/PAXJDBC/issues/PAXJDBC-102
>>
>> and few days back Sascha had requested me to create a new PR. I did
>> created
>> a new PR but the changes are yet to be accepted.
>>
>> BTW - How stable is the current snapshot version? As it is undergoing
>> major
>> changes.
>>
>> Thanks,
>> Pravin
>>
>>
>>
>>
>> --
>> View this message in context: http://karaf.922171.n3.nabble.
>> com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048795.html
>> Sent from the Karaf - User mailing list archive at Nabble.com.
>>
>
>
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> http://www.talend.com
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: pax-jdbc-dbcp2 and connection pooling

Posted by Christian Schneider <ch...@die-schneider.net>.
The major changes are done. The current state should be quite stable.

If you have the chance I would really appreciate if you can give the 
snapshot
a spin in your environment.

Christian

On 23.11.2016 16:03, dpravin wrote:
> Hi Achim,
>
> I created Jira ticket/issue
>
> https://ops4j1.jira.com/projects/PAXJDBC/issues/PAXJDBC-102
>
> and few days back Sascha had requested me to create a new PR. I did created
> a new PR but the changes are yet to be accepted.
>
> BTW - How stable is the current snapshot version? As it is undergoing major
> changes.
>
> Thanks,
> Pravin
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048795.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com


Re: pax-jdbc-dbcp2 and connection pooling

Posted by dpravin <pr...@gmail.com>.
Hi Achim,

I created Jira ticket/issue

https://ops4j1.jira.com/projects/PAXJDBC/issues/PAXJDBC-102

and few days back Sascha had requested me to create a new PR. I did created
a new PR but the changes are yet to be accepted.

BTW - How stable is the current snapshot version? As it is undergoing major
changes.

Thanks,
Pravin 




--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048795.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: pax-jdbc-dbcp2 and connection pooling

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Pravin,

is the PR still open?
Maybe Christian can look into it. And please if not already done so, make
sure it's linked to a Jira Issue.
I know we are a bit "chaotic" or "anarchic" looking here but we have one
little requirement for PRs. Make sure there is a Jira for it.
This way it's always possible to keep track of the PRs/Commits and the
Release-Notes.

thanks, Achim


2016-11-23 15:54 GMT+01:00 dpravin <pr...@gmail.com>:

> Thank you Christain.
>
> I downloaded the snapshot version few months back and added Teradata DS
> factory to it. I have created a PR but it is yet to be accepted. I will try
> to download the latest snapshot version and test it.
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.
> com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048793.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: pax-jdbc-dbcp2 and connection pooling

Posted by dpravin <pr...@gmail.com>.
Thank you Christain.

I downloaded the snapshot version few months back and added Teradata DS
factory to it. I have created a PR but it is yet to be accepted. I will try
to download the latest snapshot version and test it.

Thanks,
Pravin  



--
View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791p4048793.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: pax-jdbc-dbcp2 and connection pooling

Posted by Christian Schneider <ch...@die-schneider.net>.
Are you sure this works with 0.10.0-SNAPSHOT?

The 0.10.0-SNAPSHOT version has a big change in how pooling is declared 
in the configs:
This is the new doc:
https://ops4j1.jira.com/wiki/display/PAXJDBC/Pooling+and+XA+support+in+1.0.0

Apart from that it is definitely possible that we have a bug in handling 
connection problems. It would be great if you could supply a jira issue 
with  a way to reproduce and ideally even a test.

Christian

On 23.11.2016 15:20, dpravin wrote:
> Hi,
>
> We are using pax-jdbc for managing database connections. My environment
> details are
>
> Jboss Fuse 6.2.1
> pax-jdbc 0.10.0- SNAPSHOT
> Oracle - 11.2.0.4.0
>
> Installed following features from pax-jdbc,
>
>> features:install transaction jndi pax-jdbc-oracle pax-jdbc-pool-dbcp2
> pax-jdbc-config
>
> we have observed that if the database is restarted or there were some
> network issues all connections in the pool are corrupted. They are not
> re-initialized after the connectivity unless the container is restarted.
> Appreciate if someone can help me resolve this issue.
>
> My data source configuration for your reference,
>
> dataSourceName = dsn
> osgi.jndi.service.name = dsn
> osgi.jdbc.driver.name = oracle-pool
> url = jdbc:oracle:thin:@//<<servername>>:port/databasename
> user = user
> password = password
> pool.initalSize = 1
> pool.maxTotal = 2
> pool.minIdle = 2
>
> factory.validationQuery=select sysdate from dual
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/pax-jdbc-dbcp2-and-connection-pooling-tp4048791.html
> Sent from the Karaf - User mailing list archive at Nabble.com.


-- 
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com