use of org.springframework.jdbc.core.JdbcTemplate in project camel by apache.
the class TransactionalClientWithRollbackTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
final DataSource ds = getMandatoryBean(DataSource.class, "dataSource");
jdbc = new JdbcTemplate(ds);
}
use of org.springframework.jdbc.core.JdbcTemplate in project camel by apache.
the class MixedTransactionPropagationTest method setUp.
@Override
protected void setUp() throws Exception {
this.disableJMX();
super.setUp();
final DataSource ds = getMandatoryBean(DataSource.class, "dataSource");
jdbc = new JdbcTemplate(ds);
}
use of org.springframework.jdbc.core.JdbcTemplate in project camel by apache.
the class SpringTransactionalClientDataSourceTransactedTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
// create database and insert dummy data
final DataSource ds = getMandatoryBean(DataSource.class, "dataSource");
jdbc = new JdbcTemplate(ds);
}
use of org.springframework.jdbc.core.JdbcTemplate in project camel by apache.
the class TransactionalClientDataSourceMinimalConfigurationTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
// create database and insert dummy data
final DataSource ds = getMandatoryBean(DataSource.class, "dataSource");
jdbc = new JdbcTemplate(ds);
}
use of org.springframework.jdbc.core.JdbcTemplate in project camel by apache.
the class TemplateCacheTest method shouldCacheTemplateFunctions.
@Test
public void shouldCacheTemplateFunctions() throws InterruptedException {
JdbcTemplate jdbcTemplate = new JdbcTemplate(db);
CallableStatementWrapperFactory fac = new CallableStatementWrapperFactory(jdbcTemplate, new TemplateParser());
BatchCallableStatementCreatorFactory batchFactory1 = fac.getTemplateForBatch("FOO()");
BatchCallableStatementCreatorFactory batchFactory2 = fac.getTemplateForBatch("FOO()");
assertSame(batchFactory1, batchFactory2);
TemplateStoredProcedure templateStoredProcedure1 = fac.getTemplateStoredProcedure("FOO()");
TemplateStoredProcedure templateStoredProcedure2 = fac.getTemplateStoredProcedure("FOO()");
assertSame(templateStoredProcedure1, templateStoredProcedure2);
}
Aggregations