[Mono-list] Re: Maintaining just one DB (Npgsql) connection for web services

Joe Audette joe_audette at yahoo.com
Fri May 20 14:57:48 EDT 2005


Glad to be of help.

> 
> > Support for connection pooling is built in to the
> .NET
> > data providers.
> 
> Aha, that's the rub! This automagic "Just Works" is
> why I love the .NET
> platform.

The main thing to remember in .NET connection pooling
is that it will use a different pool for each
variation of the connection string. If your app just
uses 1 connection string I think you are all set. If
you are building a different connection string say by
credentials passed in the request, you would get a
different connection pool for each different
connection string.

I'm fairly certain the Npgsql data provider has
connection pooling enabled by default and can be
turned  off by a setting in the connection string but
you may want to double check the documentation for
Npgslq cause I'm not 100% sure. I think I have
pooling=true in my connection string but I don't have
the code here with me to check. It is possible that is
needed to enable the pooling.

Hope it helps,

Joe

joe_audette [at] yahoo dotcom
http://www.joeaudette.com
http://www.mojoportal.com


More information about the Mono-list mailing list