if (!(tm instanceof BatchModeTransactionManager))
{
throw new IllegalStateException("Unexpected transaction manager type: " + ((tm != null) ? tm.getClass().getName() : "null"));
}
BatchingManager batchingManager = new BatchingManagerImpl(tm);
SessionAttributeMarshaller marshaller = this.marshallerFactory.createMarshaller(manager);
SessionAttributeStorage<T> storage = this.storageFactory.createStorage(manager.getReplicationConfig().getReplicationGranularity(), marshaller);
return new DistributedCacheManager<T>(manager, new AtomicMapCache<String, Object, Object>(sessionCache), this.jvmRouteCacheSource, lockManager, storage, batchingManager, this.invoker);
}