tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Bobrik" <bob...@gmx.de>
Subject AW: Speeding up database accesses
Date Mon, 05 Feb 2001 21:36:35 GMT
Doing this way you have a large amount of open connection. They stay opened
until timeout because you don't know, when the user closes his browser.
So I think it's better having a connection-pool managing the DB-connection.
You could implement that using a singleton-pattern.

Ralph

> -----Urspr√ľngliche Nachricht-----
> Von: CPC Livelink Admin [mailto:cpclvlnk@fitzpatrick.cc]
> Gesendet: Montag, 5. Februar 2001 22:27
> An: tomcat-user@jakarta.apache.org
> Betreff: RE: Speeding up database accesses
>
>
>
> While there are connection pools (I have not used them but others on the
> list can point you to them), I find the easiest solution is a session
> variable. Then make a function you can call with the session and db
> connection info. The function checks the session for the DB varaible. If
> it's not there it creates the connection and adds it to the session. Then
> returns the DB. That way the call to get the connection looks
> nice and clean
> (no nasty if statements to cloud up your HTML on the JSP).
>
> Regards,
> Paul
>
>
> -----Original Message-----
> From: John Coonrod [mailto:jc@thp.org]
> Sent: Monday, February 05, 2001 4:19 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Speeding up database accesses
>
>
> I would like to leave my oracle database connection open from one page to
> another within a session - is that possible? Is it possible to pool one
> connection for the entire webserver? If so, how? Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>


Mime
View raw message