When Using a thread-local database connection, closure of the connection is required when the thread exists.
This I can only do if I can override the run() method of the
What we did was
@Override public void run() { try { // ... } finally { resource.close(); } }
Basically just always (possibly open and then) close it for all paths through the thread. In case it helps anybody out there :)