/** * Sets properties from a {@link DriverManager} URL. * Added to follow convention used in other DBMS. * * @param url properties to set */ public void setURL(String url) { setUrl(url); }
private void configureBaseDataSource(BaseDataSource ds, Properties props) throws SQLException { if (props.containsKey(JDBC_URL)) { ds.setUrl(props.getProperty(JDBC_URL)); } if (props.containsKey(JDBC_SERVER_NAME)) { ds.setServerName(props.getProperty(JDBC_SERVER_NAME)); } if (props.containsKey(JDBC_PORT_NUMBER)) { ds.setPortNumber(Integer.parseInt(props.getProperty(JDBC_PORT_NUMBER))); } if (props.containsKey(JDBC_DATABASE_NAME)) { ds.setDatabaseName(props.getProperty(JDBC_DATABASE_NAME)); } if (props.containsKey(JDBC_USER)) { ds.setUser(props.getProperty(JDBC_USER)); } if (props.containsKey(JDBC_PASSWORD)) { ds.setPassword(props.getProperty(JDBC_PASSWORD)); } for (Entry<Object, Object> entry : props.entrySet()) { ds.setProperty((String) entry.getKey(), (String) entry.getValue()); } }