Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. I want to put IDbConnection on Session with NLB/State Server configured -- but ISerializable

I want to put IDbConnection on Session with NLB/State Server configured -- but ISerializable

Scheduled Pinned Locked Moved ASP.NET
sysadmincsharpquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    devvvy
    wrote on last edited by
    #1

    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 I 2 Replies Last reply
    0
    • D devvvy

      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 Offline
      I Offline
      ice hotty
      wrote on last edited by
      #2

      you can use the profile target="_blank" .. that makes you get what you want. Study...

      D 1 Reply Last reply
      0
      • I ice hotty

        you can use the profile target="_blank" .. that makes you get what you want. Study...

        D Offline
        D Offline
        devvvy
        wrote on last edited by
        #3

        ???? What?

        1 Reply Last reply
        0
        • D devvvy

          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 Offline
          I Offline
          Ista
          wrote on last edited by
          #4

          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!!

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups