// need to be sure that we got full control. close() for sure isn't called with the pool-lock acquired.
{
final SDBCPool pool = SDBCPool.getInstance();
final Object lock = pool.getLock();
synchronized (lock) {
pool.freezeAll();
try {
sdbc.shutdown();
SDBCPool.getInstance().unregister(sdbc);
} finally {
pool.thawAll();