Hey,

>       Remember a while back when we added caching of 
> PreparedStatements
> to the Minerva driver?  That is, a pooled connection keeps all the
> PreparedStatements you use open, and reuses them if you try 
> to prepare the
> same statement again.
>       It looks like we may run into scaling problems here.  I just
> discovered (by accident) that there's a limit in Oracle to 
> the number of
> PreparedStatements you can have open at the same time, and that limit
> appears to be 100 or less, though I don't have a specific 
> number.  So if
> you deploy a connection pool in a server with a large number 
> of beans, you
> might imagine that there could easily be 100 separate SQL 
> statements...
>       I guess there are probably 2 things we need to do.  One 
> is to let
> you disable that caching altogether.  And the other is to let 
> you put some
> limit on the number of PreparedStatements it caches.  Of 
> course, that's no
> easy task, since now we'd like to implement LRU or something.  Sigh.

The LRU thing is implemented for the new bean caches, though Rickard is
revising it and so it's not commited to CVS yet (Bugs #100 and #101). It is
possible, with some modification, reuse it (the algorithm and the basic LRU
stuff, I mean) for the PreparedStatement as well I think.
Let me know if it is worthwile, I can look to the caching of prepared
statements and see how much work will be, and then we can decide if better
to rewrite or reuse.

Bye

Simon

Reply via email to