if (cacheContainer == null)
{
throw new IllegalStateException("Failed to initialize distributedManagerFactory");
}
DistributedCacheManagerFactory factory = new DistributedCacheManagerFactory();
CacheSource sessionCacheSource = new CacheSource()
{
@Override
public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
{
return cacheContainer.getCache(manager.getName());
}
};
CacheSource jvmRouteCacheSource = new CacheSource()
{
@Override
public <K, V> Cache<K, V> getCache(LocalDistributableSessionManager manager)
{
return cacheContainer.getCache(manager.getEngineName());
}
};
factory.setSessionCacheSource(sessionCacheSource);
factory.setJvmRouteCacheSource(jvmRouteCacheSource);
JBossCacheManager<OutgoingDistributableSessionData> manager = new JBossCacheManager<OutgoingDistributableSessionData>(factory);
manager.setSnapshotMode(SnapshotMode.INSTANT);
setupContainer(warName, jvmRoute, manager);