protected BatcherFactory createBatcherFactory(Properties properties, int batchSize) {
String batcherClass = properties.getProperty(Environment.BATCH_STRATEGY);
if (batcherClass==null) {
return batchSize==0 ?
(BatcherFactory) new NonBatchingBatcherFactory() :
(BatcherFactory) new BatchingBatcherFactory();
}
else {
log.info("Batcher factory: " + batcherClass);
try {
return (BatcherFactory) ReflectHelper.classForName(batcherClass).newInstance();