apache-commons-dbcp

Connection Pool Exception: Cannot get a connection, pool error Timeout waiting for idle object

試著忘記壹切 提交于 2019-11-28 07:47:04
I am running a web application in Production that recently crashed after it was under some stress. I would guess 100-300 people were accessing the site at similar times, which I would expect to work fine. The logs around the time of the crash are: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Hibernate operation: could not inspect JDBC autocommit mode; uncategorize\ d SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot get a connection, pool error Timeout waiting for idle object; nested exception is org.apache.commons.db\

how to use (useUnicode=yes characterEncoding=UTF-8 ) with DBCP

江枫思渺然 提交于 2019-11-28 06:23:38
I am trying to insert Arabic letter in to mysql database, but it only store "????". I am using DBCP for connecting with mysql databse, here is the datasource: <Resource name="jdbc/view_db" auth="Container" type="javax.sql.DataSource" username="root" password="" autoReconnect="true" testOnBorrow="true" validationQuery = "SELECT 1" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/view_db" maxActive="50" maxIdle="10"/> how to setup UTF-8 encoding with in DBCP configuration or how to use (useUnicode=yes characterEncoding=UTF-8 ) ? According to the DBCP documentation you need use

Using PreparedStatement pooling in dbcp

社会主义新天地 提交于 2019-11-27 22:28:02
问题 Can someone explain how exactly prepared connection pooling using dbcp can be used? (with some example code if possible). I've figured out how to turn it on - passing a KeyedObjectPoolFactory to the PoolableConnectionFactory. But how should the specific prepared statements be defined after that? Right now I'm only using a PoolingDataSource to get connections from the pool. How do I use the prepared statements from the pool? 回答1: Well talking about getting connection from the pool vs getting

How good is Oracle Universal Connection Pool (UCP)

╄→гoц情女王★ 提交于 2019-11-27 19:22:20
Does anybody have experience with using Oracle UCP under real production load? Does it handle database reconnects well? Are there any multi-threading issues? Has anybody compared it with C3P0 or Apache DBCP? MRalwasser I evaluated UCP 11.2.0.1 as a replacement for our legacy connection pool and I cannot recommend it : it does not fully support jdk 6 / ojdbc6.jar. For example the use of statement caching and jmx-support does not work with java 6 and throws exceptions. no internal statement cache - it relies on the jdbc driver's statement cache ( setPoolable() ) I submitted both issues to oracle

Apache Commons DBCP connection object problem, Thread: ClassCastException in org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper

送分小仙女□ 提交于 2019-11-27 12:03:48
问题 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$PoolGuardConnectionWrapper . My requirement is to pass an array of Strings to pl/sql stored procedure in Oracle. Here is what I am doing in the following code snippet: Connection dbConn = ConnectionManager.ds.getConnection(); //The above statement returns me an connection wrapped in the class //org.apache.commons

tomcat-dbcp vs commons-dbcp

一曲冷凌霜 提交于 2019-11-27 10:25:46
It seems there is a lot of confusion between these two connection pooling libraries. What I want to know is which one is better (if at all)? Here are some points which I would like to put up... Could someone please verify? Tomcat DBCP: uses the default tomcat-dbcp.jar which will be present in your tomcat/lib directory. You do not need commons-dbcp.jar or commons-pool.jar libraries in your web-inf/lib. The DB driver should be placed in tomcat/lib. Tomcat DBCP datasource class is org.apache.tomcat.dbcp.dbcp.BasicDataSource . Commons DBCP datasource class is org.apache.commons.dbcp

Spring JDBC connection pool best practices

折月煮酒 提交于 2019-11-27 06:53:22
I have a basic Spring JDBC application with a pretty basic configuration: <bean id="myDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="oracle.jdbc.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@1.1.1.1:1521:XXX"/> <property name="username" value="username"/> <property name="password" value="password"/> </bean> <bean id="dbThing" class="com.DbThing"> <property name="dataSource" ref="myDataSource"/> </bean> I would like to introduce a connection pool, and after reading several threads on SO I am a bit confused

How good is Oracle Universal Connection Pool (UCP)

守給你的承諾、 提交于 2019-11-27 04:22:01
问题 Does anybody have experience with using Oracle UCP under real production load? Does it handle database reconnects well? Are there any multi-threading issues? Has anybody compared it with C3P0 or Apache DBCP? 回答1: I evaluated UCP 11.2.0.1 as a replacement for our legacy connection pool and I cannot recommend it : it does not fully support jdk 6 / ojdbc6.jar. For example the use of statement caching and jmx-support does not work with java 6 and throws exceptions. no internal statement cache -

Connection Pool Exception: Cannot get a connection, pool error Timeout waiting for idle object

ぃ、小莉子 提交于 2019-11-27 02:03:43
问题 I am running a web application in Production that recently crashed after it was under some stress. I would guess 100-300 people were accessing the site at similar times, which I would expect to work fine. The logs around the time of the crash are: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: Hibernate operation: could not inspect JDBC autocommit mode; uncategorize\ d SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot

how to use (useUnicode=yes characterEncoding=UTF-8 ) with DBCP

泄露秘密 提交于 2019-11-27 01:19:01
问题 I am trying to insert Arabic letter in to mysql database, but it only store "????". I am using DBCP for connecting with mysql databse, here is the datasource: <Resource name="jdbc/view_db" auth="Container" type="javax.sql.DataSource" username="root" password="" autoReconnect="true" testOnBorrow="true" validationQuery = "SELECT 1" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/view_db" maxActive="50" maxIdle="10"/> how to setup UTF-8 encoding with in DBCP configuration or