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. )
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.
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.