4
Reply

What is a pre-requisite for connection pooling?

ABHI GUPTA

ABHI GUPTA

Oct 04, 2013
2k
0

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    Bharathi Raja
    January 20, 2018
    0

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    Munesh Sharma
    April 12, 2014
    0

    Assuming you mean database connections, the main points are:they must all use exactly the same connection string it is per-AppDomain for SSPI etc, the implicit user account must be common (i.e. the same domain user is being represented, or it will form multiple pools) it must be enabled and supported by the provider; in the case of SqlConnection it is on by default you must have not explicitly disabled the pool For most common cases using SqlConnection, this just means "will be pooled per unique connection-string" - the rest is automatic and just works.also; remember to use using statements around your connection usage, so you release things back to the pool even in exception - otherwise you'll exhaust it.

    Munesh Sharma
    April 12, 2014
    0

    Multiple processes must agree that they will share the same connection, where every parameter is the same, including the security settings. The connection string must be identical.

    ABHI GUPTA
    October 04, 2013
    0