{
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);
sessionCache = new AtomicMapCache<String, Object, Object>(sessionCache);
return new DistributedCacheManager<T>(manager, sessionCache, null, lockManager, storage, batchingManager, this.invoker);