Remoting & Connection Pool

  • Thread starter Thread starter RickT
  • Start date Start date
R

RickT

If I setup DB connections from a:
- client-activated remote object
- to use SQL Authentication
- individual SQL Server accounts (each user has their own SQL login ID &
password)

Assuming that the object stays instantiated, will the .net connection pool
keep the DB connection live (in the pool) even though a method within the
object executed a conn.Close()?

I'd like to have the application code practice good form and .Close whenever
the method finishes with the connection, without paying the performance
penalty of making & closing 3 db connections to execute 3 object methods by
the same user.
 
You should always close a connection when you are done with it. Closing a
connection does not remove it from the pool. The pool will remain until any
applications that are accessing that pool are closed, or the timeout occurs.
 
Back
Top