You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by KY K Lui <ky...@mailcity.com> on 2000/05/27 02:11:03 UTC

need help !!

I really feel tired about this problem

I want to develop a web application using apache and tomcat in linux.
when my webapps start, a connection pool servlet will load on startup.

the other servlets in the webapps will use this statement to get a db connection.
"pool = (connectionPool)getServletContext().getAttribute("conpool");"

sometimes this statement will work very well but sometimes it will throws a exception (classCastException: connectionPool)....

help.... why the situation will different everytime?

what is the good way to implement the db connection pool?
is it startup servlet a good method?

thanks


Get your FREE Email at http://mailcity.lycos.com
Get your PERSONALIZED START PAGE at http://my.lycos.com

Re: need help !!

Posted by Jon Stevens <jo...@latchkey.com>.
on 5/26/2000 5:11 PM, KY K Lui at kyluitomcat1@mailcity.com wrote:

> what is the good way to implement the db connection pool?

singleton based...

<http://java.apache.org/turbine/>

-jon