On 25/07/2012 15:01, Amish Shah wrote: > > Does the DBCP support prepared statement caching in the following condition > 1) connection is opened from connection pool > 2) Prepared statement are used > 3) Connection is closed but returned to connection pool > > If we reuse the connection from the connection pool is there a way the > prepared statement from step #2, > could be used without parsing again. > > > What I am seeing is that prepared statement are being parsed again? > We are using version of DBCP 1.2.1 > > Any help/response would be good.
I took a quick look at the source code. The DBCP code is a bit of a maze and I'd need to test it to be sure but I think the statement cache is retained while the connection is checked out but cleared when the connection is returned. I suspect you'll be able to check this faster than I can. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
