The benefit of pooling comes when you need a
connection and don't have to take the time and
resources to OPEN a new one.  The drivers don't do
that, and closing a connection doesn't really have
anything to do with it (in fact a pool would NOT close
an unused connection.)

Perhaps you're thinking of something else instead of
"pooling"?

--- Filip Hanik <[EMAIL PROTECTED]> wrote:
> you don't need to pool prepared statements, close
> them and the underlying
> driver will do the job for you.
> 
> Filip
> 
> > -----Original Message-----
> > From: Munteanu Gabriel
> [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 30, 2003 8:32 AM
> > To: Tomcat Users List
> > Subject: PreparedStatement Pool
> >
> >
> > 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
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 


=====
-------------------------
Mr Lauren Commons
DISCLAIMER: The opinions expressed 
ARE in fact those of my employer.

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to