6465666768697071
private static synchronized DataSource newDataSource() throws SQLException { final Properties p = new Properties(); p.setProperty("driver", org.h2.Driver.class.getName()); p.setProperty("url", "jdbc:h2:mem:" + "Test_" + (++dbCnt)); final DataSource dataSource = new SimpleDataSource(p); return dataSource; }
199200201202203204205206207208209
p.setProperty("user", username); } if (password != null) { p.setProperty("password", password); } return new SimpleDataSource(p); } catch (SQLException se) { throw new ProvisionException("Database unavailable", se); } } }