Fix broken build?
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user