typeMap = CacheFactory.getCache(AUTO_POF_MAPPING);
}
else {
Cluster cluster = CacheFactory.getCluster();
if (cluster.getServiceInfo(AUTO_POF_SERVICE) != null) {
CacheService service = (CacheService) cluster.getService(AUTO_POF_SERVICE);
typeMap = service.ensureCache(AUTO_POF_MAPPING, null);
}
else {
XmlElement xml = XmlHelper.loadXml(XML_FRAGMENT);
typeMap = new DefaultConfigurableCacheFactory(xml).ensureCache(AUTO_POF_MAPPING, null);
}