use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.
the class SqlStoredDataSourceTest method createRegistry.
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry jndi = super.createRegistry();
// START SNIPPET: e2
// this is the database we create with some initial data for our unit test
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/storedProcedureTest.sql").build();
// END SNIPPET: e2
jndi.bind("jdbc/myDataSource", db);
return jndi;
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.
the class SqlProducerOutputTypeSelectOneTest method setUp.
@Before
public void setUp() throws Exception {
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
camel1 = new DefaultCamelContext();
camel1.setName("camel-1");
camel1.getComponent("sql", SqlComponent.class).setDataSource(db);
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.
the class SqlProducerSeparatorTest method setUp.
@Before
public void setUp() throws Exception {
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/createAndPopulateDatabase.sql").build();
jdbcTemplate = new JdbcTemplate(db);
super.setUp();
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project camel by apache.
the class CallableStatementWrapperTest method setUp.
@Before
public void setUp() throws Exception {
db = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.DERBY).addScript("sql/storedProcedureTest.sql").build();
jdbcTemplate = new JdbcTemplate(db);
templateParser = new TemplateParser();
this.factory = new CallableStatementWrapperFactory(jdbcTemplate, templateParser);
super.setUp();
}
use of org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder in project spring-security-oauth by spring-projects.
the class JdbcClientTokenServicesTests method setUp.
@Before
public void setUp() throws Exception {
// creates a HSQL in-memory db populated from default scripts classpath:schema.sql and classpath:data.sql
db = new EmbeddedDatabaseBuilder().addDefaultScripts().build();
tokenStore = new JdbcClientTokenServices(db);
}
Aggregations