3 Replies Latest reply on Nov 8, 2004 1:39 PM by Bela Ban

    Newbie question: How to access the cache instance deployed i

    Pete Newbie

      Hi all,

      I am new to JBossCache, and since I am not familiar with JMX, I would like to ask the following: how can I access the cache instance that is deployed in JBoss as an Mbean from, say, the web container(servlet) ? I went through the tutorial, but it is mostly for the standalone JBossCache instances. I define the mbean in an XML file under the deploy directory, and I can see it instantiated at startup. Then how can I reach this instance from the web container? I use the default XML from the tutorial i.e cache mode is REPL_SYNC. I can copy and paste the tutorial sample code in the init() method of servlet so that it can reach this cache instance that is instantiated at startup(using the same configuration file). Is this how it is supposed to work? How can I access the cache via mbean interface?

      Any info is really appreciated!