how to test connection pooling?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Posts: 27
Joined: Sat 28 May 2005 20:37

how to test connection pooling?

Post by shutterstock » Fri 15 Jul 2005 22:50

I started to use pooling--

how do i make sure that the connection doesn't keep getting recreated and that a pooled connection is used (if available)...

is there any way to tell that im reusing existing connections - and not really creating new opened ones?


Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Post by Oleg » Mon 18 Jul 2005 09:43

You can test the connection pool as follows.

Code: Select all

connection.Open(); // connection to server is established
connection.Close(); // connection is moved to pool (you can verify it with MySQLAdmin tool)
connection.Open(); // connection is taken from pool; new one is not created
connection.Close(); // again, connection is returned to pool.

Post Reply