BATCH-1884: JobLauncherIntegrationTests failing

This commit is contained in:
Chris Schaefer
2012-08-30 16:13:17 -04:00
committed by Dave Syer
parent a8d2dd2a3f
commit 1430f3d7de
2 changed files with 6 additions and 3 deletions

View File

@@ -91,8 +91,10 @@ public class DataSourceInitializer implements InitializingBean {
}
private void doExecuteScript(final Resource scriptResource) {
if (scriptResource == null || !scriptResource.exists())
return;
if (scriptResource == null || !scriptResource.exists()) {
throw new IllegalArgumentException("Script resource is null or does not exist");
}
TransactionTemplate transactionTemplate = new TransactionTemplate(new DataSourceTransactionManager(dataSource));
transactionTemplate.execute(new TransactionCallback() {

View File

@@ -21,7 +21,8 @@
<property name="dataSource" ref="dataSource" />
<property name="initScripts">
<list>
<value>schema-hsqldb.sql</value>
<value>org/springframework/batch/core/schema-drop-hsqldb.sql</value>
<value>org/springframework/batch/core/schema-hsqldb.sql</value>
</list>
</property>
</bean>