Hi Nick...

Thanks for the feedback. I did notice after I posted the code that I had
not added the close for the Resultset and the Statement objects.

I'm going to change the Connection around and try what you suggested to
see if that causes the condition to disappear.

One of the reasons I structured the Connection in this manner is because I
read that frequently creating and dropping connections to the database was
a very expensive process on the server.

In my application, a user will probably have move from page to page and
consequently execute multiple sql queries along the way. By creating the
Connection (ConnectionBean) once and storing it in the session object, I
was attempting to eliminate the overhead of creating/dropping connections
for every query for that session.

I received an excellent response from someone in the Sun Java Forums as
well and he suggested using the JNDI Database Connection Pool. I'm looking
into that as well.

Thanks again for your feedback. It helps to have someone with experience
review what I did and at least confirm to me that the localized variables
used in the doPost method are already threadsafe. I appreciate your time.

Regards,

Brett

___________________________________________________________________________
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