Add spring-batch- to module directory names (so folks can use mvn eclipse:eclipse if they want to).

BATCH-238: Remove hibernate support for the Daos.
This commit is contained in:
dsyer
2007-12-10 21:23:48 +00:00
parent 17705f27ab
commit 8ea331bfc7
884 changed files with 956 additions and 2352 deletions

View File

@@ -0,0 +1,37 @@
/*
* Copyright 2006-2007 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.core;
import junit.framework.TestCase;
public abstract class AbstractExceptionTests extends TestCase {
public void testExceptionString() throws Exception {
Exception exception = getException("foo");
assertEquals("foo", exception.getMessage());
}
public void testExceptionStringThrowable() throws Exception {
Exception exception = getException("foo", new IllegalStateException());
assertEquals("foo", exception.getMessage().substring(0, 3));
}
public abstract Exception getException(String msg) throws Exception;
public abstract Exception getException(String msg, Throwable t) throws Exception;
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2006-2007 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.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
import org.springframework.batch.core.configuration.DuplicateJobConfigurationException;
/**
* @author Dave Syer
*
*/
public class DuplicateJobConfigurationExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new DuplicateJobConfigurationException(msg);
}
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String,
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new DuplicateJobConfigurationException(msg, t);
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2006-2007 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.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
import org.springframework.batch.core.configuration.JobConfigurationException;
/**
* @author Dave Syer
*
*/
public class JobConfigurationExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new JobConfigurationException(msg);
}
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String,
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new JobConfigurationException(msg, t);
}
}

View File

@@ -0,0 +1,97 @@
/*
* Copyright 2006-2007 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.core.configuration;
import java.util.Collections;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class JobConfigurationTests extends TestCase {
JobConfiguration configuration = new JobConfiguration("job");
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#JobConfiguration()}.
*/
public void testJobConfiguration() {
configuration = new JobConfiguration();
assertNull(configuration.getName());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#setBeanName(java.lang.String)}.
*/
public void testSetBeanName() {
configuration.setBeanName("foo");
assertEquals("job", configuration.getName());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#setBeanName(java.lang.String)}.
*/
public void testSetBeanNameWithNullName() {
configuration = new JobConfiguration(null);
assertEquals(null, configuration.getName());
configuration.setBeanName("foo");
assertEquals("foo", configuration.getName());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#setSteps(java.util.List)}.
*/
public void testSetSteps() {
configuration.setSteps(Collections.singletonList(new StepConfigurationSupport("step")));
assertEquals(1, configuration.getStepConfigurations().size());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#addStep(org.springframework.batch.core.configuration.StepConfiguration)}.
*/
public void testAddStep() {
configuration.addStep(new StepConfigurationSupport("step"));
assertEquals(1, configuration.getStepConfigurations().size());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#setStartLimit(int)}.
*/
public void testSetStartLimit() {
assertEquals(Integer.MAX_VALUE, configuration.getStartLimit());
configuration.setStartLimit(10);
assertEquals(10, configuration.getStartLimit());
}
/**
* Test method for
* {@link org.springframework.batch.core.configuration.JobConfiguration#setRestartable(boolean)}.
*/
public void testSetRestartable() {
assertFalse(configuration.isRestartable());
configuration.setRestartable(true);
assertTrue(configuration.isRestartable());
}
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2006-2007 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.core.configuration;
import org.springframework.batch.core.AbstractExceptionTests;
import org.springframework.batch.core.configuration.NoSuchJobConfigurationException;
/**
* @author Dave Syer
*
*/
public class NoSuchJobConfigurationExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new NoSuchJobConfigurationException(msg);
}
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String,
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new NoSuchJobConfigurationException(msg, t);
}
}

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2006-2007 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.core.configuration;
import junit.framework.TestCase;
import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.beans.factory.support.ChildBeanDefinition;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.context.support.GenericApplicationContext;
import org.springframework.context.support.StaticApplicationContext;
public class SpringBeanJobConfigurationTests extends TestCase {
public void testBeanName() throws Exception {
StaticApplicationContext context = new StaticApplicationContext();
JobConfiguration configuration = new JobConfiguration();
context.getAutowireCapableBeanFactory().initializeBean(configuration,
"bean");
assertNotNull(configuration.getName());
configuration.setBeanName("foo");
context.getAutowireCapableBeanFactory().initializeBean(configuration,
"bean");
assertEquals("bean", configuration.getName());
}
public void testBeanNameWithBeanDefinition() throws Exception {
GenericApplicationContext context = new GenericApplicationContext();
ConstructorArgumentValues args = new ConstructorArgumentValues();
args.addGenericArgumentValue("foo");
context.registerBeanDefinition("bean", new RootBeanDefinition(
JobConfiguration.class, args, null));
JobConfiguration configuration = (JobConfiguration) context
.getBean("bean");
assertNotNull(configuration.getName());
assertEquals("foo", configuration.getName());
configuration.setBeanName("bar");
assertEquals("foo", configuration.getName());
}
public void testBeanNameWithParentBeanDefinition() throws Exception {
GenericApplicationContext context = new GenericApplicationContext();
ConstructorArgumentValues args = new ConstructorArgumentValues();
args.addGenericArgumentValue("bar");
context.registerBeanDefinition("parent", new RootBeanDefinition(
JobConfiguration.class, args, null));
context.registerBeanDefinition("bean", new ChildBeanDefinition("parent"));
JobConfiguration configuration = (JobConfiguration) context
.getBean("bean");
assertNotNull(configuration.getName());
assertEquals("bar", configuration.getName());
configuration.setBeanName("foo");
assertEquals("bar", configuration.getName());
configuration.setName("foo");
assertEquals("foo", configuration.getName());
}
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright 2006-2007 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.core.configuration;
import junit.framework.TestCase;
import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.repeat.ExitStatus;
/**
* @author Dave Syer
*
*/
public class StepConfigurationSupportTests extends TestCase {
private StepConfigurationSupport configuration = new StepConfigurationSupport("step");
/**
* Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#StepConfigurationSupport()}.
*/
public void testStepConfigurationSupport() {
configuration = new StepConfigurationSupport();
assertNull(configuration.getName());
}
/**
* Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getName()}.
*/
public void testGetName() {
assertEquals("step", configuration.getName());
}
/**
* Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getStartLimit()}.
*/
public void testGetStartLimit() {
assertEquals(Integer.MAX_VALUE, configuration.getStartLimit());
configuration.setStartLimit(10);
assertEquals(10, configuration.getStartLimit());
}
/**
* Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#getTasklet()}.
*/
public void testGetTasklet() {
assertEquals(null, configuration.getTasklet());
Tasklet tasklet = new Tasklet() {
public ExitStatus execute() throws Exception {
return ExitStatus.FINISHED;
}
};
configuration.setTasklet(tasklet);
assertEquals(tasklet, configuration.getTasklet());
}
/**
* Test method for {@link org.springframework.batch.core.configuration.StepConfigurationSupport#isAllowStartIfComplete()}.
*/
public void testShouldAllowStartIfComplete() {
assertEquals(false, configuration.isAllowStartIfComplete());
configuration.setAllowStartIfComplete(true);
assertEquals(true, configuration.isAllowStartIfComplete());
}
}

View File

@@ -0,0 +1,46 @@
/*
* Copyright 2006-2007 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.core.domain;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class BatchStatusTests extends TestCase {
/**
* Test method for {@link org.springframework.batch.core.domain.BatchStatus#toString()}.
*/
public void testToString() {
assertEquals("FAILED", BatchStatus.FAILED.toString());
}
/**
* Test method for {@link org.springframework.batch.core.domain.BatchStatus#getStatus(java.lang.String)}.
*/
public void testGetStatus() {
assertEquals(BatchStatus.FAILED, BatchStatus.getStatus(BatchStatus.FAILED.toString()));
}
/**
* Test method for {@link org.springframework.batch.core.domain.BatchStatus#getStatus(java.lang.String)}.
*/
public void testGetStatusWrongCode() {
assertEquals(null, BatchStatus.getStatus("foo"));
}
}

View File

@@ -0,0 +1,111 @@
/*
* Copyright 2006-2007 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.core.domain;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class EntityTests extends TestCase {
Entity entity = new Entity(new Long(11));
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#hashCode()}.
*/
public void testHashCode() {
assertEquals(entity.hashCode(), new Entity(entity.getId()).hashCode());
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#hashCode()}.
*/
public void testHashCodeNullId() {
int withoutNull = entity.hashCode();
entity.setId(null);
int withNull = entity.hashCode();
assertTrue(withoutNull!=withNull);
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#getVersion()}.
*/
public void testGetVersion() {
assertEquals(null, entity.getVersion());
}
/**
* @throws Exception
*/
public void testToString() throws Exception {
Entity job = new Entity();
assertTrue(job.toString().indexOf("id=null") >= 0);
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsSelf() {
assertEquals(entity, entity);
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsSelfWithNullId() {
entity = new Entity(null);
assertEquals(entity, entity);
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsEntityWithNullId() {
entity = new Entity(null);
assertNotSame(entity, new Entity(null));
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsEntity() {
assertEquals(entity, new Entity(entity.getId()));
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsEntityWrongId() {
assertFalse(entity.equals(new Entity()));
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsObject() {
assertFalse(entity.equals(new Object()));
}
/**
* Test method for {@link org.springframework.batch.core.domain.Entity#equals(java.lang.Object)}.
*/
public void testEqualsNull() {
assertFalse(entity.equals(null));
}
}

View File

@@ -0,0 +1,150 @@
/*
* Copyright 2006-2007 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.core.domain;
import java.sql.Timestamp;
import junit.framework.TestCase;
import org.springframework.batch.core.runtime.SimpleJobIdentifier;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.context.RepeatContextSupport;
/**
* @author Dave Syer
*
*/
public class JobExecutionTests extends TestCase {
private JobExecution execution = new JobExecution(new JobInstance(null, new Long(11)));
private JobExecution context = new JobExecution(new JobInstance(new SimpleJobIdentifier("foo"), new Long(11)));
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#JobExecution()}.
*/
public void testJobExecution() {
assertNull(new JobExecution().getId());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getEndTime()}.
*/
public void testGetEndTime() {
assertNull(execution.getEndTime());
execution.setEndTime(new Timestamp(100L));
assertEquals(100L, execution.getEndTime().getTime());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getStartTime()}.
*/
public void testGetStartTime() {
assertNotNull(execution.getStartTime());
execution.setStartTime(new Timestamp(0L));
assertEquals(0L, execution.getStartTime().getTime());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getStatus()}.
*/
public void testGetStatus() {
assertEquals(BatchStatus.STARTING, execution.getStatus());
execution.setStatus(BatchStatus.COMPLETED);
assertEquals(BatchStatus.COMPLETED, execution.getStatus());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getJobId()}.
*/
public void testGetJobId() {
assertEquals(11, execution.getJobId().longValue());
execution = new JobExecution(new JobInstance(null, new Long(23)));
assertEquals(23, execution.getJobId().longValue());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getJobId()}.
*/
public void testGetJobIdForNullJob() {
execution = new JobExecution(null);
assertEquals(null, execution.getJobId());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getJobId()}.
*/
public void testGetJob() {
assertNotNull(execution.getJob());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobExecution#getExitStatus()}.
*/
public void testGetExitCode() {
assertEquals(ExitStatus.UNKNOWN, execution.getExitStatus());
execution.setExitStatus(new ExitStatus(true, "23"));
assertEquals("23", execution.getExitStatus().getExitCode());
}
public void testContextContainsInfo() throws Exception {
assertEquals("foo", context.getJob().getIdentifier().getName());
}
public void testNullContexts() throws Exception {
assertEquals(0, context.getStepContexts().size());
assertEquals(0, context.getChunkContexts().size());
}
public void testStepContext() throws Exception {
context.registerStepContext(new RepeatContextSupport(null));
assertEquals(1, context.getStepContexts().size());
}
public void testAddAndRemoveStepContext() throws Exception {
context.registerStepContext(new RepeatContextSupport(null));
assertEquals(1, context.getStepContexts().size());
context.unregisterStepContext(new RepeatContextSupport(null));
assertEquals(0, context.getStepContexts().size());
}
public void testAddAndRemoveStepExecution() throws Exception {
assertEquals(0, context.getStepExecutions().size());
context.registerStepExecution(new StepExecution(null, null));
assertEquals(1, context.getStepExecutions().size());
}
public void testAddAndRemoveChunkContext() throws Exception {
context.registerChunkContext(new RepeatContextSupport(null));
assertEquals(1, context.getChunkContexts().size());
context.unregisterChunkContext(new RepeatContextSupport(null));
assertEquals(0, context.getChunkContexts().size());
}
public void testRemoveChunkContext() throws Exception {
context.unregisterChunkContext(new RepeatContextSupport(null));
assertEquals(0, context.getChunkContexts().size());
}
public void testToString() throws Exception {
assertTrue("JobExecution string does not contain id", context.toString().indexOf("id=")>=0);
assertTrue("JobExecution string does not contain name: "+context, context.toString().indexOf("foo")>=0);
}
public void testToStringWithNullJob() throws Exception {
context = new JobExecution();
assertTrue("JobExecution string does not contain id", context.toString().indexOf("id=")>=0);
}
}

View File

@@ -0,0 +1,93 @@
/*
* Copyright 2006-2007 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.core.domain;
import java.util.Collections;
import org.springframework.batch.core.runtime.SimpleJobIdentifier;
import junit.framework.TestCase;
/**
* @author dsyer
*
*/
public class JobInstanceTests extends TestCase {
private JobInstance instance = new JobInstance(null, new Long(11));
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#JobInstance()}.
*/
public void testJobInstance() {
assertNull(new JobInstance(null).getId());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#getStatus()}.
*/
public void testGetStatus() {
assertNull(instance.getStatus());
instance.setStatus(BatchStatus.COMPLETED);
assertNotNull(instance.getStatus());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#getSteps()}.
*/
public void testGetSteps() {
assertEquals(0, instance.getSteps().size());
instance.setSteps(Collections.singletonList(new StepInstance()));
assertEquals(1, instance.getSteps().size());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#addStep(org.springframework.batch.core.domain.StepInstance)}.
*/
public void testAddStep() {
instance.addStep(new StepInstance());
assertEquals(1, instance.getSteps().size());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#getJobExecutionCount()}.
*/
public void testGetJobExecutionCount() {
assertEquals(0, instance.getJobExecutionCount());
instance.setJobExecutionCount(22);
assertEquals(22, instance.getJobExecutionCount());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#getIdentifier()}.
*/
public void testGetIdentifier() {
assertEquals(null, instance.getIdentifier());
instance = new JobInstance(new SimpleJobIdentifier("foo"));
assertEquals("foo", instance.getIdentifier().getName());
}
/**
* Test method for {@link org.springframework.batch.core.domain.JobInstance#getIdentifier()}.
*/
public void testGetName() {
assertEquals(null, instance.getName());
instance = new JobInstance(new SimpleJobIdentifier("foo"));
assertEquals("foo", instance.getName());
}
}

View File

@@ -0,0 +1,220 @@
/*
* Copyright 2006-2007 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.core.domain;
import java.sql.Timestamp;
import java.util.Properties;
import org.springframework.batch.repeat.ExitStatus;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class StepExecutionTests extends TestCase {
private StepExecution execution = newStepExecution(new Long(11),
new Long(23));
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#JobExecution()}.
*/
public void testStepExecution() {
assertNull(new StepExecution().getId());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#getEndTime()}.
*/
public void testGetEndTime() {
assertNull(execution.getEndTime());
execution.setEndTime(new Timestamp(0L));
assertEquals(0L, execution.getEndTime().getTime());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#getStartTime()}.
*/
public void testGetStartTime() {
assertNotNull(execution.getStartTime());
execution.setStartTime(new Timestamp(10L));
assertEquals(10L, execution.getStartTime().getTime());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#getStatus()}.
*/
public void testGetStatus() {
assertEquals(BatchStatus.STARTING, execution.getStatus());
execution.setStatus(BatchStatus.COMPLETED);
assertEquals(BatchStatus.COMPLETED, execution.getStatus());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#getJobId()}.
*/
public void testGetJobId() {
assertEquals(23, execution.getJobExecutionId().longValue());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.JobExecution#getExitStatus()}.
*/
public void testGetExitCode() {
assertEquals(ExitStatus.UNKNOWN, execution.getExitStatus());
execution.setExitStatus(ExitStatus.FINISHED);
assertEquals(ExitStatus.FINISHED, execution.getExitStatus());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#incrementCommitCount()}.
*/
public void testIncrementCommitCount() {
int before = execution.getCommitCount().intValue();
execution.incrementCommitCount();
int after = execution.getCommitCount().intValue();
assertEquals(before + 1, after);
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#incrementTaskCount()}.
*/
public void testIncrementLuwCount() {
int before = execution.getTaskCount().intValue();
execution.incrementTaskCount();
int after = execution.getTaskCount().intValue();
assertEquals(before + 1, after);
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#incrementRollbackCount()}.
*/
public void testIncrementRollbackCount() {
int before = execution.getRollbackCount().intValue();
execution.incrementRollbackCount();
int after = execution.getRollbackCount().intValue();
assertEquals(before + 1, after);
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#getCommitCount()}.
*/
public void testGetCommitCount() {
execution.setCommitCount(123);
assertEquals(123, execution.getCommitCount().intValue());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#getTaskCount()}.
*/
public void testGetTaskCount() {
execution.setTaskCount(123);
assertEquals(123, execution.getTaskCount().intValue());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#getRollbackCount()}.
*/
public void testGetRollbackCount() {
execution.setRollbackCount(123);
assertEquals(123, execution.getRollbackCount().intValue());
}
/**
* Test method for
* {@link org.springframework.batch.core.domain.StepExecution#getStepId()}.
*/
public void testGetStepId() {
assertEquals(11, execution.getStepId().longValue());
}
public void testToString() throws Exception {
assertTrue("Should contain task count: " + execution.toString(),
execution.toString().indexOf("task") >= 0);
assertTrue("Should contain commit count: " + execution.toString(),
execution.toString().indexOf("commit") >= 0);
assertTrue("Should contain rollback count: " + execution.toString(),
execution.toString().indexOf("rollback") >= 0);
}
public void testStatistics() throws Exception {
assertNotNull(execution.getStatistics());
execution.setStatistics(new Properties() {
{
setProperty("foo", "bar");
}
});
assertEquals("bar", execution.getStatistics().getProperty("foo"));
}
public void testEqualsWithSameIdentifier() throws Exception {
StepExecution step1 = newStepExecution(new Long(100), new Long(11));
StepExecution step2 = newStepExecution(new Long(100), new Long(11));
assertEquals(step1, step2);
}
public void testEqualsWithNull() throws Exception {
StepExecution step = newStepExecution(new Long(100), new Long(11));
assertFalse(step.equals(null));
}
public void testEqualsWithNullIdentifiers() throws Exception {
StepExecution step = newStepExecution(new Long(100), new Long(11));
assertFalse(step.equals(new StepExecution()));
}
public void testEqualsWithNullJob() throws Exception {
StepExecution step = newStepExecution(null, new Long(11));
assertFalse(step.equals(new StepExecution()));
}
public void testEqualsWithNullStep() throws Exception {
StepExecution step = newStepExecution(new Long(11), null);
assertFalse(step.equals(new StepExecution()));
}
public void testHashCode() throws Exception {
assertTrue("Hash code same as parent", new Entity(execution.getId())
.hashCode() != execution.hashCode());
}
public void testHashCodeWithNullIds() throws Exception {
assertTrue("Hash code not same as parent",
new Entity(execution.getId()).hashCode() != new StepExecution()
.hashCode());
}
private StepExecution newStepExecution(Long long1, Long long2) {
JobInstance job = new JobInstance(null);
StepInstance step = new StepInstance(job, "foo", long1);
StepExecution execution = new StepExecution(step, new JobExecution(job, long2));
return execution;
}
}

View File

@@ -0,0 +1,109 @@
/*
* Copyright 2006-2007 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.core.domain;
import java.util.Properties;
import org.springframework.batch.restart.GenericRestartData;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class StepInstanceTests extends TestCase {
StepInstance instance = new StepInstance(new Long(13));
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#StepInstance()}.
*/
public void testStepInstance() {
assertNull(new StepInstance().getId());
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getStepExecutionCount()}.
*/
public void testGetStepExecutionCount() {
assertEquals(0, instance.getStepExecutionCount());
instance.setStepExecutionCount(23);
assertEquals(23, instance.getStepExecutionCount());
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getRestartData()}.
*/
public void testGetRestartData() {
assertNotNull(instance.getRestartData());
assertTrue(instance.getRestartData().getProperties().isEmpty());
instance.setRestartData(new GenericRestartData(new Properties() {{
setProperty("foo", "bar");
}}));
assertEquals("bar", instance.getRestartData().getProperties().getProperty("foo"));
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getStatus()}.
*/
public void testGetStatus() {
assertEquals(null, instance.getStatus());
instance.setStatus(BatchStatus.COMPLETED);
assertEquals(BatchStatus.COMPLETED, instance.getStatus());
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getJob()}.
*/
public void testGetJob() {
assertEquals(null, instance.getJob());
JobInstance job = new JobInstance(null);
instance = new StepInstance(job, null);
assertEquals(job, instance.getJob());
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getName()}.
*/
public void testGetName() {
assertEquals(null, instance.getName());
instance = new StepInstance(null, "foo");
assertEquals("foo", instance.getName());
}
/**
* Test method for {@link org.springframework.batch.core.domain.StepInstance#getJobId()}.
*/
public void testGetJobId() {
assertEquals(null, instance.getJobId());
instance = new StepInstance(new JobInstance(null, new Long(23)), null);
assertEquals(23, instance.getJobId().longValue());
}
public void testEqualsWithSameIdentifier() throws Exception {
JobInstance job = new JobInstance(null, new Long(100));
StepInstance step1 = new StepInstance(job, "foo", new Long(0));
StepInstance step2 = new StepInstance(job, "foo", new Long(0));
assertEquals(step1, step2);
}
public void testToString() throws Exception {
assertTrue("Should contain name", instance.toString().indexOf("name=")>=0);
assertTrue("Should contain status", instance.toString().indexOf("status=")>=0);
}
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2006-2007 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.core.executor;
import org.springframework.batch.core.AbstractExceptionTests;
/**
* @author Dave Syer
*
*/
public class JobExecutionExceptionTests extends AbstractExceptionTests {
/* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new JobExecutionException(msg);
}
/* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String, java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new JobExecutionException(msg, t);
}
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2006-2007 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.core.executor;
import org.springframework.batch.core.AbstractExceptionTests;
/**
* @author Dave Syer
*
*/
public class StepInterruptedExceptionTests extends AbstractExceptionTests {
/* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new StepInterruptedException(msg);
}
/* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String, java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new RuntimeException(msg, t);
}
}

View File

@@ -0,0 +1,43 @@
/*
* Copyright 2006-2007 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.core.repository;
import org.springframework.batch.core.AbstractExceptionTests;
/**
* @author Dave Syer
*
*/
public class BatchRestartExceptionTests extends AbstractExceptionTests {
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String)
*/
public Exception getException(String msg) throws Exception {
return new BatchRestartException(msg);
}
/*
* (non-Javadoc)
* @see org.springframework.batch.io.exception.AbstractExceptionTests#getException(java.lang.String,
* java.lang.Throwable)
*/
public Exception getException(String msg, Throwable t) throws Exception {
return new BatchRestartException(msg, t);
}
}

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2006-2007 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.core.repository;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class NoSuchBatchDomainObjectExceptionTests extends TestCase {
public void testCreateException() throws Exception {
NoSuchBatchDomainObjectException e = new NoSuchBatchDomainObjectException("Foo");
assertEquals("Foo", e.getMessage());
}
}

View File

@@ -0,0 +1,14 @@
package org.springframework.batch.core.runtime;
import org.springframework.batch.core.domain.JobIdentifier;
import junit.framework.TestCase;
public class SimpleJobIdentifierFactoryTests extends TestCase {
public void testGetJobIdentifier() {
JobIdentifier jobIdentifier = new SimpleJobIdentifierFactory().getJobIdentifier("foo");
assertEquals("foo", jobIdentifier.getName());
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2006-2007 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.core.runtime;
import junit.framework.TestCase;
/**
* @author Dave Syer
*
*/
public class SimpleJobIdentifierTests extends TestCase {
private SimpleJobIdentifier identifier = new SimpleJobIdentifier("foo");
/**
* Test method for
* {@link org.springframework.batch.core.runtime.SimpleJobIdentifier#SimpleJobIdentifier()}.
*/
public void testSimpleJobIdentifier() {
assertNull(new SimpleJobIdentifier().getName());
}
/**
* Test method for
* {@link org.springframework.batch.core.runtime.SimpleJobIdentifier#getName()}.
*/
public void testGetName() {
assertEquals("foo", identifier.getName());
identifier.setName("bar");
assertEquals("bar", identifier.getName());
}
/**
* Test method for
* {@link org.springframework.batch.core.runtime.SimpleJobIdentifier#toString()}.
*/
public void testToString() {
assertTrue("SimpleJobIdentifier toString should contain name: " + identifier.toString(), identifier.toString()
.indexOf("name=") >= 0);
}
public void testEquals(){
SimpleJobIdentifier testIdentifier = new SimpleJobIdentifier("foo");
assertEquals(testIdentifier,identifier);
}
}

View File

@@ -0,0 +1,172 @@
Product: Clover
License: Open Source License, 0.x, 1.x
Issued: Thu Mar 15 2007 12:55:00 CDT
Expiry: Never
Maintenance Expiry: Never
Key: d24b469cbe33bb71017d39a9d
Name: Andy Colyer
Org: Spring Portfolio
Certificate: AAACUG+Ow8B7/zEbxOMqqKwwrdpP+a1COmJGHco7sCNLjHkHnajPF+dQW
Ct12PMy0uml0s9xuus5wKngJ9OFk5/FZgYzdyIG5/rxEgRevOoLO7uYipoJrkt4TPBwIm4
hxEw+b9xUNP0x1tTqSsgUP6fqSYilMajaHYGuRD9iV3LeP7hwWulpXY3hz3W5WjsKYp3Nf
fPyts/AffWHANGj5DHV+4yGm2IGIzIgHOGx9hISC7boFknmwM/GQ78RO1yzNnkSJ9dHPz2
VdGTrKob36k3OVy7vwwCPpSm+01KDpkY4ZQN4ynqPIFzvJ07F1IBUvU49CGzSvX3v6qmOp
mT11CTGtP49xPafrKNjDDV8PxCsoesEBRaY4FJzquzWz0j6CkIQqidzCj3WDCtog3ct+za
SuuZ51n027sVFhbM69dZZzv8bYCgSHdQ3sG1a9DxM7+6JRfRcIBFgt/V78vK41MF4p9Mi1
qmEPMLizpu7eBo1GDoQ8Lb3EhIWrfxDb4Db3NFc9hYpCKoreFlEw1A+eJlrLeomy43pVtk
SNPTDDoahNrXLeIu7SiRoHiemMrUjWvYtT9jwnVOsIjELa8n8cfW7gMzJdenCcNWl/T3Cr
8rSu3pVfz07AvX6+wQZWqzvGGnlwpnFXu1YJROxITYNINVNKXCAby33Mdbm51DPA3rEyk+
dpS31tU2XrR4iY1Zypja1M0voOkzL74pf9ExgUGeJqyvi5LWTn3b4kGGT/bkwhbbDn6sAA
zlxKRvxsbYOBUzk3UZ448Heg2HwCjwarCh/C0QIcX8vWnUjqssdvxT7Jlr1rZwqK1LKqbH
l7YvP9Ee7SoHfoHrW770yK23u2IdDK44Sf6G3NBE0Muq7W1bcZwrZ1/ZRk8vE2kt0F0fXI
wz7Thjs5lXvcZDJO4nEtXpmSdCaDjUXBpjvsZE2ZjPa2Q1tv3KFhHWqdfNRant7FyeWYg=
=
License Agreement: CLOVER VERSION 1 (ONE) SOFTWARE LICENSE AGREEMENT
1. Licenses and Software
Cenqua Pty Ltd, an Australian Proprietary Limited Company ("CENQUA")
hereby grants to the purchaser (the "LICENSEE") a limited, revocable,
worldwide, non-exclusive, nontransferable, non-sublicensable license
to use the Clover version 1 (one) software (the "Software"),
including any minor upgrades thereof during the Term (hereinafter
defined) up to, but not including the next major version of the
Software. The licensee shall not, or knowingly allow others to,
reverse engineer, decompile, disassemble, modify, adapt, create
derivative works from or otherwise attempt to derive source code from
the Software provided. And, in accordance with the terms and
conditions of this Software License Agreement (the "Agreement"), the
Software shall be used solely by the licensed users in accordance
with the following edition specific conditions:
a) Server Edition
A Server Edition license entitles the Licensee to execute one
instance of Clover Server Edition on one (1) machine for the purposes
of instrumententing source code and generating reports. There are no
limitations on the use of the instrumented source code or generated
reports produced by Server Edition.
b) Workstation Edition
A Workstation Edition license entitles the licensee to use Clover
Workstation Edition on one (1) machine by one (1) individual end
user. Workstation Edition does not permit the generation of reports
for distribution.
c) Team Edition
A Team Edition license entitles the licensee to use Clover Team
edition on any number of machines solely by the licensed number of
users. Reports generated by Clover Team Edition are strictly for use
only by the licensed number of individual end users.
2. License Fee
In exchange for the License(s), the Licensee shall pay to CENQUA a
one-time, up front, non-refundable license fee. At the sole
discretion of CENQUA this fee will be waived for non-commercial
projects. Notwithstanding the Licensee's payment of the License Fee,
CENQUA reserves the right to terminate the License if CENQUA
discovers that the Licensee and/or the Licensee's use of the Software
is in breach of this Agreement.
3. Proprietary Rights
CENQUA will retain all right, title and interest in and to the
Software, all copies thereof, and CENQUA website(s), software, and
other intellectual property, including, but not limited to, ownership
of all copyrights, look and feel, trademark rights, design rights,
trade secret rights and any and all other intellectual property and
other proprietary rights therein. The Licensee will not directly or
indirectly obtain or attempt to obtain at any time, any right, title
or interest by registration or otherwise in or to the trademarks,
service marks, copyrights, trade names, symbols, logos or
designations or other intellectual property rights owned or used by
CENQUA. All technical manuals or other information provided by CENQUA
to the Licensee shall be the sole property of CENQUA.
4. Term and Termination
Subject to the other provisions hereof, this Agreement shall commence
upon the Licensee's opting into this Agreement and continue until the
Licensee discontinues use of the Software or the Agreement terminates
automatically upon the Licensee's breach of any term or condition of
this Agreement (the "Term"). Upon any such termination, the Licensee
will delete the Software immediately.
5. Copying & Transfer
The Licensee may copy the Software for back-up purposes only. The
Licensee may not assign or otherwise transfer the Software to any
third party.
6. Specific Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE IS PROVIDED WITHOUT WARRANTY OF ANY KIND. CENQUA
DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. CENQUA WILL NOT BE LIABLE FOR ANY DAMAGES
ASSOCIATED WITH THE SOFTWARE, INCLUDING, WITHOUT LIMITATION,
ORDINARY, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OF ANY KIND,
INCLUDING BUT NOT LIMITED TO DAMAGES RELATING TO LOST DATA OR LOST
PROFITS, EVEN IF CENQUA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
7. Warranties and Representations
Licensee Indemnification. CENQUA agrees to indemnify, defend and hold
the Licensee harmless from and against any and all liabilities,
damages, losses, claims, costs, and expenses (including reasonable
legal fees) arising out of or resulting from the Software or the use
thereof infringing upon, misappropriating or violating any patents,
copyrights, trademarks, or trade secret rights or other proprietary
rights of persons, firms or entities who are not parties to this
Agreement.
CENQUA Indemnification. The Licensee warrants and represents that the
Licensee's actions with regard to the Software will be in compliance
with all applicable laws; and the Licensee agrees to indemnify,
defend, and hold CENQUA harmless from and against any and all
liabilities, damages, losses, claims, costs, and expenses (including
reasonable legal fees) arising out of or resulting from the
Licensee's failure to observe the use restrictions set forth herein.
8. Publicity
The Licensee grants permission for CENQUA to use Licensee's name
solely in customer lists. CENQUA shall not, without prior consent in
writing, use the Licensee's name, or that of its affiliates, in any
form with the specific exception of customer lists. CENQUA agrees to
remove Licensee's name from any and all materials within 7 days if
notified by the Licensee in writing.
9. Governing Law
This Agreement shall be governed by the laws of New South Wales,
Australia.
10.Independent Contractors
The parties are independent contractors with respect to each other,
and nothing in this Agreement shall be construed as creating an
employer-employee relationship, a partnership, agency relationship or
a joint venture between the parties.
11. Assignment
This Agreement is not assignable or transferable by the Licensee.
CENQUA in its sole discretion may transfer a license to a third party
at the written request of the Licensee.
12. Entire Agreement
This Agreement constitutes the entire agreement between the parties
concerning the Licensee's use of the Software. This Agreement
supersedes any prior verbal understanding between the parties and any
Licensee purchase order or other ordering document, regardless of
whether such document is received by CENQUA before or after execution
of this Agreement. This Agreement may be amended only in writing by
CENQUA.

View File

@@ -0,0 +1,13 @@
log4j.rootCategory=INFO, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n
log4j.category.org.apache.activemq=ERROR
log4j.category.org.springframework.batch=DEBUG
log4j.category.org.springframework.transaction=INFO
log4j.category.org.hibernate.SQL=DEBUG
# for debugging datasource initialization
# log4j.category.test.jdbc=DEBUG