dbcp

Auto Reconnect of Database Connection

I have a DBCP connection pool in Tomcat. The problem is that when the connection is lost briefly the appliction is broken because DBCP won't try to reconnect again later when there is a connection. Can I get DBCP to reconnect automatically? ...

[Toplink] How to add c3p0 or DBCP Connection pool?

Hello, Could you please explain to me how to add a standalone c3pO or DBCP connection pool to my toplink-based JPA project? I have a persistence.xml file, and everytime I want to query the database, I'm doing this: EntityManagerFactory emf = this.getEntityManagerFactory(); // Surely using persistence.xml to set up the factory Enti...

Connection Pool hangs using Glassfish and Apache DBCP with Spring

We have a Spring application that uses Apache DBCP for connection pooling. Our app has been in production for almost a year with no problems. However, during the past few weeks, the application has frozen a number of times. (By frozen, I mean no requests are handled.) The problem is temporarily fixed by restarting the Glassfish domai...

dbcp: number of open prepared statement

Hi, I get MaxOpenPreparedStatement exception in my program. I can monitor number of objects in GenericObjectPool with getNumActive()/getNumIdle() functions. How can I get connection & prepared statement pools from org.apache.commons.dbcp.BasicDataSource object? Thanks ...

Getting a Connection with DBCP via the Sybase Jconnect JDBC driver

I am trying to get a Connection in the following code and I keep getting an SQLException with the message "Login failed" and with the details "Specified database not found". Connection con = null; BasicDataSource dataSource = new BasicDataSource(); dataSource.setDriverClassName("com.sybase.jdbc.SybDriver"); dataSource.setUsername("u...

Upgrading commons DBCP from 1.2 to 1.4, should I be afraid?

I was wondering if there were any big known issues out there. After upgrading the jar in my project, everything compiled. I didn't really see anything in the release notes that made me shudder, but I want to double check. ...

JDBC driver unregisted when the web application stops

I am getting this message when I run my web application. It runs fine but I get this message during shutdown. SEVERE: A web application registered the JBDC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered...

Disable connection pool on Tomcat

Hello! How can I disable default connection pooling on Tomcat? Is there any Resource parameter for that? Thanks in advance! ...

MaxOpenPreparedStatements limit reached

Hi, I get this exception only for SOME database update in my code after several days of application running. Some of the requests passed, and some of them (the same java code) fail. java.sql.SQLException: MaxOpenPreparedStatements limit reached at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:1...

Logging in DBCP

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 possible to write the code that outputs the status of the BasicDataSource when connection is borrowed from the pool. However there is no way to t...

How to evict or "kill" open connections when these are above a fixed limit (using dbcp w/ oracle)

Hi all, Does anyone know how to evict or kill open connections (in use or not it doesn't matter) if the number of connections is above of a fixed limit (e.g. maxActive) Currently I'm using DBCP from Apache under a Sun One 6.1. Thanks in advance!, ...

Concurrency problem using spring, dbcp and postgres

The software stack I'm using is: tomcat->spring-> hibernate-> DBCP -> postgreSQL I have a query that search for some data using a column of type "timestamp without time zone". If the application is tested in a single user mode, then there are no problems. I'm using JMeter to make some stress test and can see that sometimes the query f...

Is this error related to the OS or the database ??

I have a java programs that gives me an error after working fine for a few hours ... these programs used to work fine on our earlier server which had windows server 2003 now we have upgraded to windows server 2008 with a higher configuration and newly installed SQL Server .Is there any db setting that i'm missing or is there any OS setti...

Pooling PreparedStatement on Tomcat with MySQL

When using Tomcat with MySQL, what is the relationship between poolPreparedStatements setting in Tomcat DataSource configuration (I believe coming from DBCP) and Connector/J cachePrepStmts setting? What's the optimal configuration? ...