config.setSyncCommitPhase(true);
config.setSyncRollbackPhase(true);
if (passivationDir != null)
{
CacheLoaderManagerConfig managerConfig = new CacheLoaderManagerConfig();
managerConfig.setPassivation(true);
managerConfig.setPreload(!purgeCacheLoader);
FileCacheStoreConfig fileConfig = new FileCacheStoreConfig();
fileConfig.setLocation(passivationDir);
fileConfig.setFetchPersistentState(mode.isReplicated());
fileConfig.setPurgeOnStartup(purgeCacheLoader);
managerConfig.setCacheLoaderConfigs(Collections.<CacheLoaderConfig>singletonList(fileConfig));
config.setCacheLoaderManagerConfig(managerConfig);
}
final EmbeddedCacheManager sessionContainer = new DefaultCacheManager(global, config, false);