wrote:
> On Mar 7, 2:29 pm, christop...@dailycrossword.com wrote:
>> Greetings,
>> I am using JDBC (probably version 2), and I use code like this to open
>> and close connections:
> I have examined the source for the pooled connection's close() method,
> and it simply returns the connection object to a generic pool (Jakarta
> commons DBCP and Pool), so it seems as though no reset is ever done to
> release locks or close temporary tables, etc., as is is in other
> pooled connectors. I have read a number of posts from several years
> ago either asking the same question, or declaring that 'table locks'
> should never be used in 'robust applications'. I am very concerned
> that an uncaught exception or transient network failure would lock the
> table indefinitely.
>
> For what it's worth I am re-designing that portion of the application
> to produce meaningful (if a little stale) data without using the table
> locks.
LOCK TABLE is a hack. A hack that does not fit well with Java.
InnoDB tables, transactions and a suitable transaction isolation
level.
Arne