db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Network Client/Server BLOB
Date Fri, 30 Mar 2007 22:45:53 GMT
>   I was running my test harness code to create a new user.  I had a 
> number of poorly coded sql statements causing exceptions, and eventually 
> i came to a point where the derby database server gave up.

Make sure that when you catch SQLException and continue running,
that you close the various JDBC objects that you were using. In
particular, if you execute a query and create a ResultSet, close
the ResultSet, and if you create a Statement or PreparedStatement,
close the statement.

You can't open an infinite number of statements and result sets,
so try to be sure to close them when you are done with them.

See if that helps your program run longer without running out of memory.



View raw message