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

Christopher Nehren apeiron+usenet at coitusmentis.info
Fri May 20 14:15:03 EDT 2005


I'm in the process of designing some web services, and they'll speak to
a database through an assembly that I'll also be writing. I've learned
from my experience in other database-backed web development environments
that it's generally a good idea to reuse one connection to the database
rather than spawning a new one for every request. I haven't been able to
find anything documenting how to enable this for .NET data providers. I
have a few ideas of how to implement it using things like a Unix socket
(this code will only run on a Unix system, so no need to worry about
lack of portability), but I'd like some nice, simple method call that I
can use which will handle the magic for me. Thanks in advance for any
information.

Best Regards,
Christopher Nehren

P.S.: Thanks a million, million times for Mono. I have been obsessing
over it for at least three months now. :)
-- 
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong questions, you get answers like "42" and "God".
Unix is user friendly. However, it isn't idiot friendly.



More information about the Mono-list mailing list