"A.R.Karthikeyan" wrote:
> Hi everybody,
> I've developed a site entirely on servlets and the first page is the login
> page generated by a servlet,where a connection to the Access database is
> established during the init lifecycle of the servlet,so when there are
> several users logging on to this site a database connection is already
> achieved and so it leads to faster verification of the login details.I have
> not closed this connection anywhere in this servlet.
> If the login is successful ,then a session is created for every user so that
> he can traverse accross the other pages of the sites where by each and every
> page is generated by a separate servlet program.
> Some of these pages consist of form fields which need to be saved in the
> Access database.
> My question is should I establish a connection in the init event of each of
> the servlets that generate HTML pages with connectivity to the database or
> since a connection to the database has already been achieved by the servlet
> which generated the login page (& not yet closed ),so can i use the same
> connection object that pertains to the first servlet in my remaining
> servlets to make updates to the database.
> Looking forward to some help from you.
> Thanks in advance
> Karthikeyan A.R
> [...]
Hi :-) from several emais which are repling your email, I also think
you can use a DBConnection pool made by other people , and if you
don't want to use that, I guess you can make another *helping class*:
* it holds 0/several DBConnection(s)
* perhaps you can make it as a Singleton style class
* so now I guess you can use it in/from all your Servlet classes.
Bo
Dec.07, 2000
___________________________________________________________________________
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