tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Need Help w. Database Servlet.
Date Mon, 29 Jan 2007 01:53:22 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve,

Mr. Steve Burrus wrote:
> hi all. I find myself in need of help/assistance with a longtime problem
> of mine and that is how do you get a servlet working with a backend
> database server??

I can see several problems with your code, but you didn't say what
specifically was not working.

The problems I see right away are:

1. A failure to properly protect against DB connection leakage
   in the init method of your servlet.

2. The use of shared connection and statement objects for all requests,
   which will eventually lead to inaccurate data in your database
   (you need to either create a separate statement object for
   each request, or you need to serialize access to the shared objects).

Other than these issues, your servlet should /work/, though probably not
very well.

Would you care to explain what exactly isn't working?

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFvVOR9CaO5/Lv0PARAjZFAJ0ZI99vNtgHss36GpvEGEf/F+DVRQCgvfGg
fHEZjJ75Nf3dtsNjJ4+Kl0Q=
=39f4
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message