[opencms-dev] nested SQL Exception if connection pool
Christoph P. Kukulies
kuku at physik.rwth-aachen.de
Fri Feb 29 18:34:28 CET 2008
On Fri, Feb 29, 2008 at 05:48:31PM +0100, Jordi Mart? wrote:
> Wops, my bad:
>
> Connection c;
> Statement st;
> ResultSet rs;
> try {
> c=getSqlManager()......;
> st=c......
> rs=st....
> }
> catch (Exception e) {
> e.printStackTrace();
> }
> finally {
> rs.close();
> st.close();
> c.close();
> }
Then you get an error, that rs,st and c may not be initialized.
Or am I wrong?
>
> (this is an ugly example, you should do some exception checking, some
> logging, create managers and dao classes to do all this stuff, blablablabla,
> ok?).
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
More information about the opencms-dev
mailing list