use of org.h2.jdbcx.JdbcDataSource in project che by eclipse.
the class FlywaySchemaInitializerTest method setUp.
@BeforeMethod
public void setUp() throws URISyntaxException {
dataSource = new JdbcDataSource();
dataSource.setUrl("jdbc:h2:mem:flyway_test;DB_CLOSE_DELAY=-1");
}
use of org.h2.jdbcx.JdbcDataSource in project java-design-patterns by iluwatar.
the class App method createDataSource.
private static DataSource createDataSource() {
JdbcDataSource dataSource = new JdbcDataSource();
dataSource.setURL(DB_URL);
return dataSource;
}
use of org.h2.jdbcx.JdbcDataSource in project che by eclipse.
the class H2DBTestServer method getDataSource.
@Override
public DataSource getDataSource() {
final JdbcDataSource dataSource = new JdbcDataSource();
dataSource.setUrl(getUrl());
return dataSource;
}
use of org.h2.jdbcx.JdbcDataSource in project che by eclipse.
the class H2TestHelper method inMemoryDefault.
/**
* Creates new default datasource to in memory database
* with url {@value #DEFAULT_IN_MEMORY_DB_URL}.
* Boots database if this is invoked first time, database
* won't be shutdown until 'SHUTDOWN' query is executed
* or {@link #shutdownDefault()} is called directly.
*
* @return datasource to the in memory database
* @deprecated use {@link H2DBTestServer}.
*/
@Deprecated
public static DataSource inMemoryDefault() {
final JdbcDataSource dataSource = new JdbcDataSource();
dataSource.setUrl(DEFAULT_IN_MEMORY_DB_URL);
return dataSource;
}
use of org.h2.jdbcx.JdbcDataSource in project aries by apache.
the class TransactionLogTest method setupServerAndDataSource.
private void setupServerAndDataSource() throws SQLException {
server = Server.createTcpServer("-tcpPort", "0");
server.start();
File dbPath = new File("target/recovery-test/database");
dataSource = new JdbcDataSource();
dataSource.setUrl("jdbc:h2:tcp://127.0.0.1:" + server.getPort() + "/" + dbPath.getAbsolutePath());
}
Aggregations