Fix broken build?

This commit is contained in:
dsyer
2010-03-29 11:47:19 +00:00
parent 7327b66ab2
commit 8c55fcf8b1
8 changed files with 38 additions and 72 deletions

View File

@@ -17,8 +17,8 @@
package test.jdbc.datasource;
import java.io.IOException;
import java.util.List;
import java.util.Arrays;
import java.util.List;
import javax.sql.DataSource;
@@ -50,7 +50,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean {
private Log logger = LogFactory.getLog(getClass());
private static boolean initialized = false;
private boolean initialized = false;
public void setInitialize(boolean initialize) {
this.initialize = initialize;

View File

@@ -1,37 +0,0 @@
package test.jdbc.datasource;
import java.io.File;
import javax.sql.DataSource;
import org.apache.derby.jdbc.EmbeddedDataSource;
import org.springframework.beans.factory.config.AbstractFactoryBean;
public class DerbyDataSourceFactoryBean extends AbstractFactoryBean {
private String dataDirectory = "derby-home";
public void setDataDirectory(String dataDirectory) {
this.dataDirectory = dataDirectory;
}
protected Object createInstance() throws Exception {
File directory = new File(dataDirectory);
System.setProperty("derby.system.home", directory.getCanonicalPath());
System.setProperty("derby.storage.fileSyncTransactionLog", "true");
System.setProperty("derby.storage.pageCacheSize", "100");
final EmbeddedDataSource ds = new EmbeddedDataSource();
ds.setDatabaseName("derbydb");
ds.setCreateDatabase("create");
ds.getConnection().close();
ds.setCreateDatabase(null);
return ds;
}
public Class<DataSource> getObjectType() {
return DataSource.class;
}
}

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
<bean id="dataSource"
class="org.springframework.jdbc.datasource.IsolationLevelDataSourceAdapter">
<property name="targetDataSource">
<bean
class="test.jdbc.datasource.DerbyDataSourceFactoryBean" />
</property>
<!-- Keep the isolation level low so that a cursor in an ItemReader will not lock the table -->
<property name="isolationLevelName"
value="ISOLATION_READ_COMMITTED" />
</bean>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:alt.properties" />
<property name="ignoreUnresolvablePlaceholders" value="false" />
<property name="order" value="0" />
</bean>
</beans>

View File

@@ -1,4 +0,0 @@
batch.schema.script=schema-derby.sql
batch.business.schema.script=business-schema-derby.sql
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer
batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler

View File

@@ -9,6 +9,7 @@ batch.jdbc.user=sa
batch.jdbc.password=
batch.jdbc.testWhileIdle=false
batch.jdbc.validationQuery=
batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-hsqldb.sql
batch.schema.script=classpath:/org/springframework/batch/core/schema-hsqldb.sql
batch.business.schema.script=classpath:/business-schema-hsqldb.sql
batch.data.source.init=true

View File

@@ -29,5 +29,5 @@ log4j.appender.chainsaw.layout=org.apache.log4j.xml.XMLLayout
### debug your specific package or classes with the following example
log4j.logger.org.springframework.jdbc=info
log4j.logger.org.springframework.batch=info
log4j.logger.org.springframework.batch=debug
log4j.logger.org.springframework.batch.sample=debug

View File

@@ -0,0 +1,33 @@
/*
* Copyright 2006-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.sample;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* Temporary test suite to find bug in build....
*
*/
@Ignore
@RunWith(Suite.class)
@SuiteClasses({SkipSampleFunctionalTests.class, CustomerFilterJobFunctionalTests.class})
public class TestSuite {
}