The problem with doing that is if the servlet is an
often used object, you are sharing one connection with
all your users. This could serve as a bottleneck. For
a high volume servlet you would probably want to
create a separate connection for each use.
--

On Thu, 11 Mar 1999 10:25:09   Bill Lynch wrote:
>Kenia,
>
>Definitely put it in the init() method -- that way the connection will
>be made once and you can reuse it.
>
>--Bill
>
>> Kenia Nimesh wrote:
>>
>> Where should I be placing my steps of connecting the database ??
>>
>> like Class.forName() and Creating a Connection Object.
>>
>> In the init() or in the service() method??
>>
>> Thank You
>>
>> Nimesh
>>
>>
>
>--
> ----------------------------------
> Bill Lynch -- [EMAIL PROTECTED]
>        University of Iowa
>  http://www.cs.uiowa.edu/~bmlynch
> ----------------------------------
>
>___________________________________________________________________________
>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
>


HotBot - Search smarter.
http://www.hotbot.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