tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Munteanu Gabriel" <gmunte...@rdslink.ro>
Subject PreparedStatement Pool
Date Fri, 30 May 2003 15:31:36 GMT
I want to make a PreparedStatementPool with all
my SQL queries[not all, because I noticed that not all of them is good to be prepared] my
site will use. 
Anyway, I reailized that there are around 35 queries.
Now, I made a guess and I think 15 wil be used REALLY very frequently.
Also, I assume that there can be 20 simultaneous users on a query like one of these 15.
If I will make the Pool with 20 PreparedStatements objects for each query,
it means that there will be 15*20 = 300 objects, that will hold occupied 300 connections.

I am sure[almost] that there will not be all of these 300 busy in the same moment.
So I want these PreparedStatements to use themselves a Connection Pool [say 50 conns].

The PROBLEM: There is no PreparedStatement.setConnection(), and I don't think I can move a
PreparedStatement from a connection to another.

Is there a way of doing this? r some kind of a workaround?

Thank you in advance.

Gabi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message