I have this simple piece of code:
@Override
public Object call() throws Exception {
try (Connection conn = ConnectionPool.getConnection()) {
pageDAO = new PageDAO(conn);
linkDAO = new LinkDAO(conn);
loopInsertion();
}
return true;
}
I'm getting a SQLException
in the getConnection()
method. If I put a catch
, the exception is catched in the block, but if not, the Exception is not throwed ahead, but an error not occurs. Appears that it became locked and not continues the code execution.
Why this behavior? I misunderstood something? This is not expected to do?