}
private static CacheManager getManagerForCache(String cacheConfigName)
throws ClusteringNotSupportedException
{
CacheManager cm = null;
try
{
cm = CacheManagerLocator.getCacheManagerLocator().getCacheManager(null);
}
catch (Throwable t)
{
throw new ClusteringNotSupportedException("Could not access CacheManager for JBossWeb clustering", t);
}
if (!cm.getConfigurationNames().contains(cacheConfigName))
throw new IllegalStateException("CacheManager does not recognize config " + cacheConfigName);
return cm;
}