apache-commons-dbcp Questions

3

Solved

We are using the org.apache.commons.dbcp.BasicDataSource as parent class for our datasources in Spring. Is it possible to specify which schema to use in either the "url" or in another property in ...
Shogun asked 1/4, 2011 at 6:24

4

I have a terrible problem with Tomcat, well terrible because of this problem I've thrown away the project for more than a month now... Yet I'll still need to solve it and to go on with the project....
Righthander asked 7/7, 2012 at 17:8

2

I'm new to Spring, still learning. I'm using Spring Tool Suite version 3.5 with Java 6 on my Mac. I'm attempting to use BasicDataSource <bean id="dataSource" destroy-method="close" class="org.a...
Mingle asked 14/5, 2014 at 12:11

4

Solved

I use DBCP pool and I want use testOnBorrow and testOnReturn to test if connection is still valid. Unfortunately I have to set property validationQuery to make it work. Question: What value should...
Retinol asked 21/5, 2012 at 11:20

1

After switching to PgBouncer in a Spring application that uses HikariCP(or Apache DBCP2) do I need to make additional configuration for HikriCP(or Apache DBCP2) side?
Reveille asked 13/6, 2019 at 13:26

7

Solved

I am trying to configure dbcp2 with postgres 9.1 When I run my app, it throws exception: Exception in thread "main" org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC C...
Gumboil asked 31/8, 2014 at 17:3

11

I am using Apache Commons DBCP (commons-dbcp.jar) Connection pool. Once I obtained a connection from the pool it is wrapped in the class org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnecti...
Signatory asked 27/6, 2011 at 6:53

4

When I invoke createClob method using connection object as shown below: Clob clob = con.createClob(); Following exception is thrown: Caused by: java.sql.SQLFeatureNotSupportedException: Method ...
Epilate asked 11/5, 2017 at 1:38

1

We are facing a problem that the number of connections made to the database explodes during restarts of Tomcat 7. Our configurations are below, set on Tomcat's context.xml: <Resource auth="Con...
Heathenish asked 7/5, 2019 at 13:18

15

Solved

What is the best connection pooling library available for Java/JDBC? I'm considering the 2 main candidates (free / open-source): Apache DBCP - http://commons.apache.org/dbcp/ C3P0 - http:...
Margaretamargarete asked 6/2, 2009 at 14:57

1

Solved

I use spring boot 2 with Hikari connection pool, jpa and postgres. Is there any reason to continue to use theses options spring.datasource.testOnBorrow=true spring.datasource.validationQuery=SELE...

4

Solved

I'm trying to better understand what will happen if multiple threads try to execute different sql queries, using the same JDBC connection, concurrently. Will the outcome be functionally correct? ...

4

Solved

I have a basic Spring JDBC application with a pretty basic configuration: <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="dri...
Culley asked 25/2, 2011 at 12:25

1

I don't know, how to approach a solution for the following scenario. We have a new requirement to remove DB Password from properties even though it's encrypted with Jasypt library or some other al...

1

Solved

I have just upgraded Spring/SpringBoot dependencies and noticed that class JdbcTemplate does not have property "nativeJdbcExtractor" any more. I was able to find the details and background: https...
Bourguiba asked 11/5, 2018 at 15:12

5

Solved

I'm using DBCP data source (with default configuration) in Spring configuration to manage my connections to the database, and I'm running into a deadlock condition when the number of clients increa...
Concavity asked 19/4, 2011 at 9:49

2

Solved

We are seeing situations where our database connection from org.apache.commons.dbcp.BasicDataSource is dying with socket write errors: com.microsoft.sqlserver.jdbc.SQLServerException: Connection r...
Valdes asked 8/9, 2011 at 15:34

1

Solved

I use this code to make a connection with Sql server and i get that error when i use Class.forName(driver) it connect correctly but i prefer to use DataSourse. static final BasicDataSource dataSou...
Groff asked 20/4, 2017 at 9:15

4

I am trying to implement row level security so our application can enforce more stringent access control. One of the technologies we are looking into is Oracle's Virtual Private Database, which al...
Senega asked 4/10, 2016 at 15:21

21

Solved

I am trying to create a connection to my database, when I put test my code using the main method, it works seamlessly. However, when trying to access it through Tomcat 7, it fails with error:...
Lubbock asked 5/4, 2011 at 18:30

1

Solved

While configuring DBCP2 pool, and based on documentation I noticed that - there is a configuration called timeBetweenEvictionRunsMillis which is described as: The number of milliseconds to sleep...
Mesosphere asked 31/7, 2016 at 14:42

1

I read from DBCP2 documentation that this new version supports JMX monitoring for connection pool, but I couldn't find any example which shows actual usage. I have a simple JDBC based java applica...
Goldstein asked 25/1, 2016 at 16:50

2

Solved

I'm trying to create an embedded H2 server which I could also access remotly and also use Tomcat DBCP Pooling. Here is my code to produce the dataSource : @Produces @ApplicationScoped public Data...
Kurbash asked 2/7, 2014 at 9:57

1

Somewhere in a large application, there is some piece of code that does not return a connection to the connection pool as it should. The result is that that the pool reaches quickly the maximum con...

4

I'm using Apache Commons DBCP. There is a task to track the inner behavior of the DBCP - number of active and idle connections. I found out that DBCP lacks any such logging at all. Yes, tt is pos...
Hatteras asked 30/8, 2010 at 0:51

© 2022 - 2025 — McMap. All rights reserved.