Hey!
I suggest that you *not* hold the connection at all.
Just get it when you need it. If you are worried
about performance, connection pools will help.
I, for one, never hold a connection. It's too
problematic. I can name a half dozen things
that can go wrong.
Sans adieu,
Danny Rubis
Henning Brune wrote:
> Hello,
>
> in our servlet application we face the problem of loosing
> the database connection all couple of days.
>
> Now we want to restart it every 24 hours. My first idea
> is to use a thread that sleeps this long time an then does
> the restart. Are there any drawbacks with this solution ?
>
> Is there any function in the servlet API or J2EE for realizing
> time scheduled tasks ?
>
> Thanks,
> Henning
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html