I am unsure what DBCP does. It sounds like it would do something similar. But, as for iBATIS the statement caching is used in the SessionScope. This means that the cache doesn't persist across unrelated calls (obviously). It only exists for the duration of the connection being used. If you demarcate a transaction and call SQL that is able to use the same PreparedStatement it will create the first one and resuse it for all subsequent calls by retrieve it from the prepared statement cache. So, if that is the same as the DBCP... you can decide to use whichever you wish.
Brandon On 1/11/07, Koka Kiknadze <[EMAIL PROTECTED]> wrote:
Hi, Recently I posted the following question, but got no answer. Maybe it's wrong question or maybe it was wrong time to ask (too close to Christmas). With iBatis 2.3 I have two options: Set statementCahingEnabled = "true" in my configuration and also, as I'm using DBCP, I can set also DBCP property poolPreparedStatements = "true". Both seem to address same thing, so is it correct to think that enabling statementCahingEnabled makes sense with SimpleDataSourse, but is redundant with DBCP with poolPreparedStatements =true? TYA