When using the tomcat-dbcp DataSource, when my web application code gets a
connection:

myConnection = myDataSource.getConnection();

then executes multiple separate statements

myStatement1 = myConnection.createStatement();
myStatement1.execute();

myStatement2 = myConnection.createStatement();
myStatement2.execute();

then close the connection

myConnection.close();

Is it possible that myStatement1 and myStatement2 would be run using
different physical database connections, or are they absolutely guaranteed
to be executed using the same connection?

Or is connection pooling only for not actually closing the physical database
connection on myConnection.close(), instead returning it to the connection
pool?

A different way of asking this is does connection pooling pool connections
within an application connection (myDataSource.getConnection() and
myConnection.close()), or between application connections?

If this question doesn't make sense, I can clarify. Thanks a lot.
-- 
View this message in context: 
http://www.nabble.com/Connection-Pool-and-Connections-tf3853952.html#a10918685
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to