[jboss-user] [JBossCache] - Clearing cache contents in JBoss using GUI

suman291857 do-not-reply at jboss.com
Wed Jan 24 10:24:36 EST 2007


Hello,
Can anyone advise me how to clear cache using JMX Mbeans.This is the xml file which iam loading
<?xml version="1.0" encoding="UTF-8" ?> 
  | <server>
  |   <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" /> 
  | 
  |   <!--  ====================================================================  --> 
  |   <!--  Defines TreeCache configuration                                       --> 
  |   <!--  ====================================================================  --> 
  |   <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=CustomTreeCache">
  |     <depends>jboss:service=Naming</depends> 
  |     <depends>jboss:service=TransactionManager</depends> 
  | 
  | 
  |     <!-- Configure the TransactionManager --> 
  |     <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> 
  | 
  |     <!-- 
  |             Node locking level : SERIALIZABLE
  |                                  REPEATABLE_READ (default)
  |                                  READ_COMMITTED
  |                                  READ_UNCOMMITTED
  |                                  NONE        
  |     --> 
  |     <attribute name="IsolationLevel">REPEATABLE_READ</attribute> 
  | 
  |     <!--     Valid modes are LOCAL
  |                              REPL_ASYNC
  |                              REPL_SYNC
  |     --> 
  |     <attribute name="CacheMode">LOCAL</attribute>
  |  
  |    
  |     <!--    The max amount of time (in milliseconds) we wait until the
  |             initial state (ie. the contents of the cache) are retrieved from
  |             existing members in a clustered environment
  |     --> 
  |     <attribute name="InitialStateRetrievalTimeout">5000</attribute> 
  |     
  |    
  | 
  |     <!--    Number of milliseconds to wait until all responses for a
  |             synchronous call have been received.
  |     --> 
  |     <attribute name="SyncReplTimeout">10000</attribute> 
  | 
  |     <!--  Max number of milliseconds to wait for a lock acquisition --> 
  |     <attribute name="LockAcquisitionTimeout">15000</attribute> 
  | 
  | 	
  | 
  |   </mbean>
  |   <mbean code="org.jboss.cache.TreeCacheView" name="jboss.cache:service=TreeCacheView">
  |   	         	<depends>jboss.cache:service=CustomTreeCache</depends>
  |   	         	<attribute name="CacheService">jboss.cache:service=CustomTreeCache</attribute>
  |       		</mbean>
  | </server>     
  | 

And i have TreeCacheGUI from the JMX console.Even on deleting the Node from TreeCacheGUI ,my code still seems to pick up the old cache contents.
Hers the code snippet

  | 
  | ClassPathXmlApplicationContext context = ApplicationContextSingleton.getSpringApplicationContext();
  | 			  TreeCacheMBean cacheObj = (TreeCacheMBean)context.getBean(CACHE_SPRING_BEAN_NAME);
  | (List<Offer>)cacheObj.get(path, key);  
  | 

Can anyone kindly advise?

Many Thanks
Prashanth


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4005824#4005824

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4005824



More information about the jboss-user mailing list