@@ -0,0 +1,1116 @@
+package com.kylin.infinispan.demo.test;%0A%0Aimport java.io.BufferedInputStream;%0Aimport java.io.IOException;%0A%0Aimport javax.xml.stream.FactoryConfigurationError;%0Aimport javax.xml.stream.XMLInputFactory;%0Aimport javax.xml.stream.XMLStreamException;%0Aimport javax.xml.stream.XMLStreamReader;%0A%0Aimport org.infinispan.Cache;%0Aimport org.infinispan.manager.DefaultCacheManager;%0A%0Aimport com.customized.tools.common.ResourceLoader;%0Aimport com.kylin.infinispan.demo.CacheListener;%0A%0Apublic class CacheTest %7B%0A%0A%09public static void main(String%5B%5D args) throws IOException, XMLStreamException, FactoryConfigurationError %7B%0A%09%09%0A//%09%09BufferedInputStream input = new BufferedInputStream(ResourceLoader.getInstance().getResourceAsStream(%22infinispan-replication.xml%22));%0A//        XMLStreamReader streamReader = XMLInputFactory.newInstance().createXMLStreamReader(input);%0A%0A%09%09DefaultCacheManager cacheManager = new DefaultCacheManager(ResourceLoader.getInstance().getResourceAsStream(%22infinispan-replication.xml%22));%0A%09%09Cache%3CString, String%3E cache = cacheManager.getCache(%22CacheTest%22);%0A%09%09cache.addListener(new CacheListener());%0A%09%09cache.start();%0A%09%7D%0A%0A%7D%0A

update infinispan demo code