connection-pooling

ODP.NET Connection Lifetime clarification

According to the ORACLE documentation, the Connection Lifetime attribute is checked when the connection is closed and released back to the connection pool, if the connection was open for longer than the Lifetime setting then it is cleared from the pool. My question is, does the counter for the Connection Lifetime reset after it's releas...

Java Connection Pooling best practices?

After getting fed up with c3p0's constant locking I'm turning to boneCP for an alternative Connection Pool for my Database. I have a server app that processes around 7,000 items per minute and needs to log those items into our mysql database. I currently have 100 worker threads and have set up my Pool like such: BoneCPConfig config = ne...

Entity Framework and Connection Pooling

I've recently started to use the Entity Framework 4.0 in my .NET 4.0 application and am curious about a few things relating to pooling. Connection pooling as I know is managed by the ADO.NET data provider, in my case that of MS SQL server. Does this apply when you instantiate a new entities context (ObjectContext), i.e. the parameterle...

Efficient SQL test query that will work across all (or most) databases

Many database connection pooling libraries provide the ability to test their SQL connections for idleness. For example, the JDBC pooling library c3p0 has a property called preferredTestQuery, which gets executed on the connection at configured intervals. Many example queries I've seen are for MySQL and recommend using SELECT 1; as the v...

wcf slow connection and number of connections in the pool

Hi, I have a wcf client. The client calls a function and then closes. If I use netstat there is only one connection. I made an experiment. In the server function I put Thread.sleep(10000). Then again I started the client. With netstat I found out that there are 5 connections. Why when the response is slow the client opens more conn...

How many connections are available in the ADO.NET connection pool

Is it possible (from a asp.net application) to check how many connections of the ADO.NET connection pool are currently in-use and how many are available (not currently in-use)? ...

Entity Framework 4 and SQL Server App Roles - How to Work Together?

I’m researching EF4 for a new in-house application development project using .NET v4, EF4, & SQL Server 2008 R2. To date, our small dev team has done very little .NET development and only demonstration EF applications. Our current applications use DB app-roles for security and that's worked out well for us. From reading and some basic ...

XMPP Connection Pool

Hello. I'm developing service which communicates with users via my own protocol (persistent socket connection). I need to add possibility for users to send and receive messages via XMPP. So, on server I wish to implement connection pool for XMPP connections, but I think it's already done, but google says nothing... Do you now implementat...

C3P0 apparent deadlock when the threads are all empty?

I'm using C3P0 as a connection pool in Tomcat, and I'm seeing very worrying errors: 2010-09-16 13:25:00,160 [Timer-0] WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@43502400 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 2010...

BasicDataSource close() method does not close connections

Hello all, I have a short script opening datasource and then closing it. This script is using BasicDataSource. BasicDataSource bds = new BasicDataSource(); bds.setDriverClassName("com.mysql.jdbc.Driver"); bds.setUrl("jdbc:mysql://10.1.1.186:3306/logs"); bds.setUsername("root"); bds.setPassword(""); Connection connection = bds.getConnec...

Cannot get a connection, pool exhausted

Hi, I am using Spring,ibatis. I have configured following in xml file <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"><value>${driverClassName}</value></property> <property name="url"><value>${url}</value></property> <property name="u...

Multiple connection pools in Tomcat 7

I have a web app running on Tomcat 7, that requires a connection to multiple databases. For efficiency's sake I'd like to employ multiple connection pools using JDBC and probably DBCP. What options are available using multiple pools? The Tomcat server has multiple, virtual hosts and web applications on each virtual host. ...

SqlConnection.ClearAllPools, what is cleared?

I have an application which uses SqlConnection.ClearAllPools to close all connections before dropping a database. There is a case where a connection is still there. This connection had been created in another application domain. So I wonder which connections are closed by SqlConnection.ClearAllPools? Only the connections opened by t...

Best way to manage DB connections without JNDI

I have a website, in which currently I am getting 1000 page views. I am expecting it will go around 30k per day in future. Now the problem for me to manage the DB connections. At present I am just connecting to DB directly from java program. I know it is worst design in the world. But for time being I have written like that. I have plan ...

How to enable connection pooling over LDAP SSL?

Okay, so I'm moving my application over from non-SSL to SSL connections to my LDAP server. When running the application in non-SSL, connection pooling is working fine. However when I switch to SSL connection pools no longer work. While researching here I realized that I never set the "com.sun.jndi.ldap.connect.pool.protocol" property to...

How do I solve a connection pool issue?

I have recently started encountering Database connection issues with SQL Server on my development machine. System.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool How can I monitor the connection pool to figure out what is happening? Further Info: I haven't had m...

Something wrong with Hibernate DB connection pooler c3p0

since last post, did all the changes suggested but this problem still haunts me. Here's the error i get: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 44,499,102 milliseconds ago. here's my hibernate.cfg.xml <?xml version='1.0' encoding='utf-8'?> <!DOCTYP...

glassfish connection pool additionnal delay while re-creating after idle timeout

Hi, We are currently deploying some applications on a glassfish 3.0.1 using a postgres database through postgresql-9.0-801.jdbc4.jar Our actual configuration regarding the connexion pool is : Idle Timeout : 120 seconds Max Wait Time : 60000 millisecondes Initial and Mimimum Pool Size : 1 Maximum Pool Size : 1 Pool Resize Quantity : 1 ...

How can I handle a web application that connects to many SQL Server databases?

I am building an ASP.NET web application that will use SQL Server for data storage. I am inheriting an existing structure and I am not able to modify it very much. The people who use this application are individual companies who have paid to use the application. Each company has about 5 or 10 people who will use the application. Ther...

DB connection pool in Standalone Axis2?

For my services in production environment I always set up DB connections pool in Tomcat's context.xml: <Resource name="jdbc/MyDB" auth="Container" type="javax.sql.DataSource" maxActive="256" maxIdle="5" maxWait="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" username="xxx" password="xxx" driver...