if (getCasProcessorFilter() == null) {
CasProcessorFilter filter = CpeDescriptorFactory.produceCasProcessorFilter("");
setCasProcessorFilter(filter);
}
if (getErrorHandling() == null) {
CasProcessorErrorHandling errorHandling = CpeDescriptorFactory
.produceCasProcessorErrorHandling();
CasProcessorMaxRestarts maxRestart = CpeDescriptorFactory.produceCasProcessorMaxRestarts();
maxRestart.setRestartCount(30);
maxRestart.setAction("terminate");
errorHandling.setMaxConsecutiveRestarts(maxRestart);
CasProcessorTimeout timeout = CpeDescriptorFactory.produceCasProcessorTimeout();
timeout.set(100000);
errorHandling.setTimeout(timeout);
CasProcessorErrorRateThreshold errorThreshold = CpeDescriptorFactory
.produceCasProcessorErrorRateThreshold();
errorThreshold.setMaxErrorCount(100);
errorThreshold.setMaxErrorSampleSize(1000);
errorThreshold.setAction("terminate");
errorHandling.setErrorRateThreshold(errorThreshold);
setErrorHandling(errorHandling);
}
if (getCheckpoint() == null) {
CpeCheckpoint checkpoint = CpeDescriptorFactory.produceCpeCheckpoint();
checkpoint.setBatchSize(1);