Connection

Uthiresh Narayanan <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <003001c2cc37$c7561410$22101fac@PCP4069>
Hi,
    In one of the functions in my servlet a connection is opened thru JDBC.
In the try - catch - finally block of the code the connection is closed.

I know that to open and close connections  in not the correct way to do it.

After sometime the database shows maximum sessions exceeded and locks up.
Could this be becoz of this reason or someother reason.

I also wanted a design stratergy to open database connections in a servlet.

Maybe define a global static connection object and open it in init() and
close it when the servelet is unloaded in destroy().

any better ideas?

TIA,
uthiresh

___________________________________________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.