Anything that can boost OJB performance and that is switched off by default should only be a benefit, as far as I can tell.
But please leave this disable by default since memory requirements usually
rise quite rapidly if caching stuff that might hold on to ResultSet data etc
and since it might introduce extra overhead for the drivers that already do
caching of PreparedStatement automatically.
This was my intention, by default disabled and configurable at runtime. I will set this on my todo-list for 1.x since this needs some changes in StatementForClass interface.
When you create your implementation, also consider dropping everything from you cache that does not have any positional parameter at all since caching eg: SELECT column FROM TABLE WHERE conditional_column = 1; SELECT column FROM TABLE WHERE conditional_column = 2; SELECT column FROM TABLE WHERE conditional_column = 3; ...etc will fill up the cache quickly and stop it from making greater benefit for proper reusable statements like: SELECT column FROM TABLE WHERE conditional_column = ?; (Since I assume you have some LRU/round robin or similar algorithm with a fixed max size.)
I will keep things as simple as possible and only cache PreparedStatement instances and only till the used connection was returned to pool (this should prevent any memory issues).
Also, when you are working in this area: could you have a look at this class:
org.apache.ojb.broker.accesslayer.SQLCachingStatementsForClass
To me it looks really similar to StatementsForClassImpl, but never (?) had a
commented entry in OJB.properties for StatementsForClassClass setting and
is per Vadim's last patch outdated (not supporting ResultSet as out-param
from callable statements). Could we just remove this class?
yep, this class can be removed.
regards, Armin
Regards, Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
