tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Wingfield <>
Subject Re: [OT] JDBC confusion
Date Thu, 07 Aug 2003 09:10:50 GMT
I agree with Nix, use a connection pool.
One connection per user may be ok when you've got, say, 5 concurrent 
users but when you've got 1000, 10000, .... Not scalable.


john-paul delaney wrote:

> Hello List... newbie question coming up:
> If I set up a jdbc connection object in one servlet, do I have to close it each time
or can the same connection be re-utilized by other servlets each using a different sql statement
(perhaps storing the connection as a session attribute?).
> Is there a significant resource saving by not creating a JDBC connection object for each
database access?
> I'm thinking of storing a connection for each user in the session, as opposed to pooling
- primarily because I'm not sure how a database pool works nor how to set it up.  Should I
do a re-think on this?
> I'm using one postgresql 7.3.3
> thanks
> /j-p.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message