Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to understand the concept of connection pooling. When a connection is obtained from pool, how many statements can be created from a connection, how many resultset can be created from a statement, thread safe concepts and connection pool management. Can some one point to good resource which explains these concepts with some example (opening/closing of connection, statment, resultset etc. )
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Please refer java.sql.Statement

By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.


Regards,
Amit
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naresh Chaurasia wrote:When a connection is obtained from pool, how many statements can be created from a connection, how many resultset can be created from a statement...


The same as when the connection is not obtained from the pool. Why would there be a difference? The only difference is that you don't create the connection yourself, the pool creates it and gives it to you when you ask for one. So if you're looking for a resource which explains all those things, the ordinary JDBC tutorial is just fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic