@Override public void preStart() { if (createTablesOnStartup) { String[] createStatements = getStatements().getCreateLockSchemaStatements(); Connection connection = null; Statement statement = null; try { connection = getConnection(); statement = connection.createStatement(); setQueryTimeout(statement); for (int i = 0; i < createStatements.length; i++) { LOG.debug("Executing SQL: " + createStatements[i]); try { statement.execute(createStatements[i]); } catch (SQLException e) { LOG.info("Could not create lock tables; they could already exist." + " Failure was: " + createStatements[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode()); } } } catch (SQLException e) { LOG.warn("Could not create lock tables; Failure Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode(), e); } finally { close(statement); close(connection); } } }
@Override public void preStart() { if (createTablesOnStartup) { String[] createStatements = getStatements().getCreateLockSchemaStatements(); Connection connection = null; Statement statement = null; try { connection = getConnection(); statement = connection.createStatement(); setQueryTimeout(statement); for (int i = 0; i < createStatements.length; i++) { LOG.debug("Executing SQL: " + createStatements[i]); try { statement.execute(createStatements[i]); } catch (SQLException e) { LOG.info("Could not create lock tables; they could already exist." + " Failure was: " + createStatements[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode()); } } } catch (SQLException e) { LOG.warn("Could not create lock tables; Failure Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode(), e); } finally { close(statement); close(connection); } } }
@Override public void preStart() { if (createTablesOnStartup) { String[] createStatements = getStatements().getCreateLockSchemaStatements(); Connection connection = null; Statement statement = null; try { connection = getConnection(); statement = connection.createStatement(); setQueryTimeout(statement); for (int i = 0; i < createStatements.length; i++) { LOG.debug("Executing SQL: " + createStatements[i]); try { statement.execute(createStatements[i]); } catch (SQLException e) { LOG.info("Could not create lock tables; they could already exist." + " Failure was: " + createStatements[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode()); } } } catch (SQLException e) { LOG.warn("Could not create lock tables; Failure Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode(), e); } finally { close(statement); close(connection); } } }
@Override public void preStart() { if (createTablesOnStartup) { String[] createStatements = getStatements().getCreateLockSchemaStatements(); Connection connection = null; Statement statement = null; try { connection = getConnection(); statement = connection.createStatement(); setQueryTimeout(statement); for (int i = 0; i < createStatements.length; i++) { LOG.debug("Executing SQL: " + createStatements[i]); try { statement.execute(createStatements[i]); } catch (SQLException e) { LOG.info("Could not create lock tables; they could already exist." + " Failure was: " + createStatements[i] + " Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode()); } } } catch (SQLException e) { LOG.warn("Could not create lock tables; Failure Message: " + e.getMessage() + " SQLState: " + e.getSQLState() + " Vendor code: " + e.getErrorCode(), e); } finally { close(statement); close(connection); } } }