connection-pooling

DataSource or ConnectionPoolDataSource for Application Server JDBC resources

拈花ヽ惹草 提交于 2019-11-27 01:17:37
问题 When creating JNDI JDBC connection pools in an application server, I always specified the type as javax.sql.ConnectionPoolDataSource . I never really gave it too much thought as it always seemed natural to prefer pooled connections over non-pooled. However, in looking at some examples (specifically for Tomcat) I noticed that they specify javax.sql.DataSource . Further, it seems there are settings for maxIdle and maxWait giving the impression that these connections are pooled as well.

WebApp (Tomcat-jdbc) Pooled DB connection throwing abandon exception

匆匆过客 提交于 2019-11-27 00:55:52
问题 I have been browsing SO for some time, and chewing my hat in the process, but cannot find an exact match to my problem. For short, I am getting superb stack trace (org.apache.tomcat.jdbc.pool.ConnectionPool abandon) after 60 seconds of inactivity, which is a normal behavior for a couple of server side threads. I am using Tomcat JDBC Connection Pooling (org.apache.tomcat.jdbc.pool.DataSource) directly Stack Trace: Oct 29, 2012 8:55:50 PM org.apache.tomcat.jdbc.pool.ConnectionPool abandon

JDBC connection pool runs out of connections when Context reload=“true” is enabled in Tomcat

蓝咒 提交于 2019-11-27 00:27:34
问题 I am developing a Java EE web application in Eclipse Juno. I have configured Tomcat to use JDBC connection pool (org.apache.tomcat.jdbc.pool) along with PostgreSQL database. Here are the configurations in my project's META-INF/context.xml: <?xml version="1.0" encoding="UTF-8"?> <Context> <!-- Configuration for the Tomcat JDBC Connection Pool --> <Resource name="jdbc/someDB" type="javax.sql.DataSource" auth="Container" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName=

What is the best solution for database connection pooling in python?

烈酒焚心 提交于 2019-11-27 00:14:57
I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework. The solution works great except that every time a new request is made, I open a new connection via MySQLdb.connect. What is the best "drop in" solution to switch this over to using connection pooling in python? I am imagining something like the commons DBCP solution for Java. The process is long running and has many threads that need to make requests, but not all at the same time... specifically they do quite a lot

hibernate connection pool

不想你离开。 提交于 2019-11-27 00:04:05
问题 I can't seem to get hibernate to use c3p0 for connection pooling, it says 12:30:35,038 INFO DriverManagerConnectionProvider:64 - Using Hibernate built-in connection pool (not for production use!) 12:30:35,038 INFO DriverManagerConnectionProvider:65 - Hibernate connection pool size: 20 Hibernate Config: <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost

What is database pooling?

廉价感情. 提交于 2019-11-26 23:46:32
问题 I just wanted to know the concept of database connection pooling and how it is achieved. 回答1: Database connection pooling is a method used to keep database connections open so they can be reused by others. Typically, opening a database connection is an expensive operation, especially if the database is remote. You have to open up network sessions, authenticate, have authorisation checked, and so on. Pooling keeps the connections active so that, when a connection is later requested, one of the

Java JDBC connection pool library choice in 2011/2012?

拟墨画扇 提交于 2019-11-26 21:25:22
Which JDBC connection pool library should I use for a new application project (not web application)? Apache DBCP has enough unresolved issues which are pushed until 2.0 I think. C3P0 development seems to be stopped. And both of them looks relatively slow . Proxool is dead. DBPool has almost no community (at least I've found no public one - no forums, no mailing lists...) Apache Tomcat Pool looks to be unusable without Tomcat I've found SQL Datasources article at Oracle website, but it seems, that it can be applied only to applets running in containers like servlets and web services. Should I

Connection Timeout and Connection Lifetime

你。 提交于 2019-11-26 20:36:53
问题 What is the advantage and disadvantage of connection timeout=0? And what is the use of Connection Lifetime=0? e.g (Database=TestDB; port=3306; Uid=usernameID; Pwd=myPassword; Server=192.168.10.1; Pooling=false; Connection Lifetime=0; Connection Timeout=0) and what is the use of Connection Pooling? 回答1: Timeout is how long you wait for a response from a request before you give up. TimeOut=0 means you will keep waiting for the connection to occur forever. Good I guess if you are connecting to a

Accessing a MySQL connection pool from Python multiprocessing

[亡魂溺海] 提交于 2019-11-26 20:29:20
问题 I'm trying to set up a MySQL connection pool and have my worker processes access the already established pool instead of setting up a new connection each time. I'm confused if I should pass the database cursor to each process, or if there's some other way to do this? Shouldn't MySql.connector do the pooling automatically? When I check my log files, many, many connections are opened and closed ... one for each process. My code looks something like this: PATH = "/tmp" class DB(object): def _

Where do I have to place the JDBC driver for Tomcat's connection pool?

大憨熊 提交于 2019-11-26 20:08:39
So I've figured out my error, now I'm just looking for some insight as to what is going on exactly. I am using Apache Tomcat Version 7.0.32. I am using this tutorial to set up pooling for JDBC. In my META-INF folder I made a context.xml file and put this in there. <?xml version="1.0" encoding="UTF-8"?> <Context> <Resource type="javax.sql.DataSource" name="jdbc/gmustudent" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/official" username="root" password="root" maxActive="100" maxIdle="20" minIdle="15" initialSize=