{
// check if cache part of a distributed cluster
try
{
CacheManagerPeerProvider peerProvider = ehcache.getCacheManager().getCacheManagerPeerProvider("RMI");
return ((peerProvider != null) && (peerProvider.listRemoteCachePeers(ehcache).size() > 0));
}
catch (CacheException ce)
{
}
return false;