[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani msurtani at jboss.com
Thu Nov 16 13:41:26 EST 2006


  User: msurtani
  Date: 06/11/16 13:41:26

  Modified:    src/org/jboss/cache  TreeCache.java
  Log:
  proper cache destruction in destroy()
  
  Revision  Changes    Path
  1.278     +7 -2      JBossCache/src/org/jboss/cache/TreeCache.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: TreeCache.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/TreeCache.java,v
  retrieving revision 1.277
  retrieving revision 1.278
  diff -u -b -r1.277 -r1.278
  --- TreeCache.java	16 Nov 2006 18:15:26 -0000	1.277
  +++ TreeCache.java	16 Nov 2006 18:41:25 -0000	1.278
  @@ -95,7 +95,7 @@
    * @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
    * @author Brian Stansberry
    * @author Daniel Huang (dhuang at jboss.org)
  - * @version $Id: TreeCache.java,v 1.277 2006/11/16 18:15:26 msurtani Exp $
  + * @version $Id: TreeCache.java,v 1.278 2006/11/16 18:41:25 msurtani Exp $
    *          <p/>
    * @see <a href="http://labs.jboss.com/portal/jbosscache/docs">JBossCache doc</a>
    */
  @@ -605,6 +605,7 @@
       */
      public void create() throws Exception
      {
  +      if (notifier == null) notifier = new Notifier(this);
         stateFetchTimeout = configuration.getLockAcquisitionTimeout() + 5000;
         if (configuration.isNodeLockingOptimistic())
         {
  @@ -651,6 +652,7 @@
            initialiseCacheLoaderManager();
         }
   
  +      getRegionManager(); // make sure we create one
         createEvictionPolicy();
   
         switch (configuration.getCacheMode())
  @@ -717,7 +719,7 @@
         // build interceptor chain
         interceptor_chain = new InterceptorChainFactory().buildInterceptorChain(this);
   
  -      regionManager.setDefaultInactive(configuration.isInactiveOnStartup());
  +      getRegionManager().setDefaultInactive(configuration.isInactiveOnStartup());
   
         useCreateService = true;
      }
  @@ -815,6 +817,9 @@
       */
      public void destroy()
      {
  +      useCreateService = false;
  +      regionManager = null;
  +      notifier = null;
      }
   
   
  
  
  



More information about the jboss-cvs-commits mailing list