---
Veena T
Assistant Profesor,
Manipal Center for Information Science,
Manipal.
        576 119
Email: [EMAIL PROTECTED]
Telephone: 91+08252-71915/71914






On Mon, 22 May 2000 15:25:45   Xu Jianwu wrote:
>I've tried the solution of overriding the construction method and it seems
>working. Overriding init() sounds more reasonable since the construction
>method of Servlet does nothing. But what is the difference between the 2
>solutions? Even for overriding init(), how to inform the client in case of
>DB connection failure?
>
>Thank you.
>
>-----Original Message-----
>7"<~HK: Vishal Salian <[EMAIL PROTECTED]>
>JU<~HK: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>HUFZ: 2000Dj5TB22HU 14:16
>VwLb: Re: Servlet with JDBC
>
>
>>Try giving the Class.forName() in the init method of the servlet .This will
>>create only one instance.
>>Regards,
>>
>>Vishal
>>
>>
>>>From: Xu Jianwu <[EMAIL PROTECTED]>
>>>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
>>>        Servlet API Technology." <[EMAIL PROTECTED]>
>>>To: [EMAIL PROTECTED]
>>>Subject: Servlet with JDBC
>>>Date: Mon, 22 May 2000 13:23:34 +0800
>>>
>>>I am developing servlets with JDBC API to access my database. In order to
>>>ensure that the database connection is created only once for the threads
>of
>>>a servlet, where or when should I Class.forName() and
>>>DriveManager.getConnection()? Should I override the construction method of
>>>(e.g.) HttpServlet and do them there?
>>
>>________________________________________________________________________
>>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>>
>>___________________________________________________________________________
>>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
>


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

___________________________________________________________________________
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

Reply via email to