Hi,
Cassio Souza wrote:
H,
iI'm running into a limit on the number of open statements within a long
connection using DB2 and as I looked into what controls OJB gave to me to
re-use existing prepared statements instead of creating new ones, it is not
clear what I can do. Has anyone experinced the same kind of problem and
knows how to deal with it? I looked into class SQLCachingStatementsForClass
but it doesn;t seem that it is caching the JDBC prepared statements, just
the generated SQL string. Should I define another implementation of
StatementsForClassIF, maybe a subclass of StatementsForClassImpl, to cache
the PreparedStatement and re-use them within a transaction, or is this not
possible due to some constraints with the OJB architecture? Or is there
another way to achieve it that I might be missing?
OJB itself doesn't cache any Statement. We discuss this problem some time ago on the dev-list, because I had problems with sapDB/maxDB driver to enable driver-based PreparedStatement caching.
http://www.mail-archive.com/[email protected]/msg01214.html
Normally the jdbc-driver supports statement caching. If not, the used connection-pool implementation may supports this feature.
commons-DBCP does support it. Current DBCP based ConnectionFactory implementation (ConnectionFactoryDBCPImpl) doesn't support this feature of DBCP, but next upcoming version of OJB will do (new version of this class is in CVS OJB_1_0_RELEASE branch).
regards, Armin
Thanks in advance for any help,
Cassio Souza
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
