I want to put IDbConnection on Session with NLB/State Server configured -- but ISerializable
-
I want to put IDbConnection on Session with NLB (Network load balancing -- State Server) configured -- but ISerializable is a requirement for NLB... I can't extend SqlConnection because it's "sealed", what would you recommend? You'd probably ask why because ADO.NET comes with builtin connection pooling - what I find is that CreateConnection still takes time and it's faster if I just grab it from Session. Thanks in advance.
-
I want to put IDbConnection on Session with NLB (Network load balancing -- State Server) configured -- but ISerializable is a requirement for NLB... I can't extend SqlConnection because it's "sealed", what would you recommend? You'd probably ask why because ADO.NET comes with builtin connection pooling - what I find is that CreateConnection still takes time and it's faster if I just grab it from Session. Thanks in advance.
-
I want to put IDbConnection on Session with NLB (Network load balancing -- State Server) configured -- but ISerializable is a requirement for NLB... I can't extend SqlConnection because it's "sealed", what would you recommend? You'd probably ask why because ADO.NET comes with builtin connection pooling - what I find is that CreateConnection still takes time and it's faster if I just grab it from Session. Thanks in advance.
Well first. Why not just specify ISerializable with the attribute for your class [Serializable] public MyClass : IDbConnection You can use the connection. What makes it pooled is specifying the same connection string. You could have your own class hosted in COM+ and that will also support connection pooling. But if your using ADO connection pooling, why would you even need to store the connection object in the session? Thats what I dont get. By storing it in the session, and not using JIT, you are disabling any advantage that connection pooling would have because your not releasing it back to the pool. Thats what I dont get. Something is wrong here. Its the way your using pooling. Nick 1 line of code equals many bugs. So don't write any!!