Using MBean APIs to Manage an XML MetaData Cache

You can use the Configuration MBean APIs to create your own cache, and to add, get, and delete data from the cache. For more information on MBeans, see Programming Management Applications, at http://e-docs.bea.com/wli/docs70/devmgmt/manage.htm.

Retrieving the Singleton XMLCacheMBean

Use the following code to retrieve the singleton XMLCacheMBean:

Context ctx = new InitialContext();
MBeanHome home = (MBeanHome) ctx.lookup(MBeanHome.LOCAL_JNDI_NAME); (XMLCacheMBean) xmlCacheMBean = home.getMBean(XMLCacheMBean.SINGLETON_MBEAN_NAME, XMLCacheMBean.MBEAN_TYPE);
String key = "key1"; 

Using the Configuration MBean API

The Configuration MBean API provides the following methods to add an entry to, or to get or delete an entry from the XML MetaData Cache:

Previous Document Next Document