Exemplo n.º 1
0
 public static UnpooledDataSource createUnpooledDataSource(String resource) throws IOException {
   Properties props = Resources.getResourceAsProperties(resource);
   UnpooledDataSource ds = new UnpooledDataSource();
   ds.setDriver(props.getProperty("driver"));
   ds.setUrl(props.getProperty("url"));
   ds.setUsername(props.getProperty("username"));
   ds.setPassword(props.getProperty("password"));
   return ds;
 }
 public void setUrl(String url) {
   dataSource.setUrl(url);
   forceCloseAll();
 }