@Override public String getJdbcPassword() { return sqlCredentialSettings.getJdbcPassword(); } }
@Override public String getJdbcPassword() { return sqlCredentialSettings.getJdbcPassword(); } }
public String getJdbcPassword() { return sqlSettings.getJdbcPassword(); }
public String getJdbcPassword() { return sqlSettings.getJdbcPassword(); }
/** * Brings robustness to some Tomcat classloading issues. */ public static Connection createConnection(OntopSQLCredentialSettings settings) throws SQLException { try { // This should work in most cases (e.g. from CLI, Protege, or Jetty) return DriverManager.getConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); } catch (SQLException ex) { // HACKY(xiao): This part is still necessary for Tomcat. // Otherwise, JDBC drivers are not initialized by default. if (settings.getJdbcDriver().isPresent()) { try { Class.forName(settings.getJdbcDriver().get()); } catch (ClassNotFoundException e) { throw new SQLException("Cannot load the driver: " + e.getMessage()); } } return DriverManager.getConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); } } }
/** * Brings robustness to some Tomcat classloading issues. */ public static Connection createConnection(OntopSQLCredentialSettings settings) throws SQLException { try { // This should work in most cases (e.g. from CLI, Protege, or Jetty) return DriverManager.getConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); } catch (SQLException ex) { // HACKY(xiao): This part is still necessary for Tomcat. // Otherwise, JDBC drivers are not initialized by default. if (settings.getJdbcDriver().isPresent()) { try { Class.forName(settings.getJdbcDriver().get()); } catch (ClassNotFoundException e) { throw new SQLException("Cannot load the driver: " + e.getMessage()); } } return DriverManager.getConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); } } }
public Connection getConnection(OntopSQLCredentialSettings settings) throws SQLException { return getConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); } }
public Connection createConnection(OntopSQLCredentialSettings settings) throws SQLException { return createConnection(settings.getJdbcUrl(), settings.getJdbcUser(), settings.getJdbcPassword()); }