51,57c51,59 < public boolean obtain() throws java.io.IOException { < if (jdbcDirectory.getDialect().useExistsBeforeInsertLock()) { < // there are databases where the fact that an exception was thrown < // invalidates the connection. So first we check if it exists, and < // then insert it. < if (jdbcDirectory.fileExists(name)) { < return false; --- > public boolean obtain() { > try { > if (jdbcDirectory.getDialect().useExistsBeforeInsertLock()) { > // there are databases where the fact that an exception was thrown > // invalidates the connection. So first we check if it exists, and > // then insert it. > if (jdbcDirectory.fileExists(name)) { > return false; > } 58a61,72 > jdbcDirectory.getJdbcTemplate().executeUpdate(jdbcDirectory.getTable().sqlInsert(), > new JdbcTemplate.PrepateStatementAwareCallback() { > public void fillPrepareStatement(PreparedStatement ps) throws Exception { > ps.setFetchSize(1); > ps.setString(1, name); > ps.setBlob(2, null); > ps.setLong(3, 0); > ps.setBoolean(4, false); > } > }); > } catch (Exception e) { > return false; 60,69d73 < jdbcDirectory.getJdbcTemplate().executeUpdate(jdbcDirectory.getTable().sqlInsert(), < new JdbcTemplate.PrepateStatementAwareCallback() { < public void fillPrepareStatement(PreparedStatement ps) throws Exception { < ps.setFetchSize(1); < ps.setString(1, name); < ps.setBlob(2, null); < ps.setLong(3, 0); < ps.setBoolean(4, false); < } < });