Hi,
I have managed to successfully start the JBoss Cache on a Glassfish server.
I am now trying to get a handle to the cache object so I can write/read from it or shut it down.
Unfortunately, when I look at the ObjectNames in the mbean server I find the following:
[PPHCache]: jboss.cache:jmx-resource=CacheMgmtInterceptor,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=MVCCLockManager,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=RegionManager,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=InterceptorChain,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=TxInterceptor,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=TransactionTable,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=DataContainer,service=PPHCache [PPHCache]: jboss.cache:jmx-resource=RPCManager,service=PPHCache
String serviceName="jboss.cache:service=PPHCache";
Cache cache=null;
CacheFactory factory = new DefaultCacheFactory();
System.out.println("[PPHCache]: About to create cache");
cache = factory.createCache();
System.out.println("[PPHCache]: Get Platform MBeanServer");
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
ObjectName on = null;
System.out.println("[PPHCache]: Try to create ObjectName");
on = new ObjectName(serviceName);
JmxRegistrationManager jmxManager = new JmxRegistrationManager(cache, on);
jmxManager.registerAllMBeans();
System.out.println("[PPHCache] Start the cache.");
cache.create();
cache.start();