View Javadoc
1   /**
2    * Copyright By Grandsoft Company Limited.  
3    * 2012-6-5 下午02:39:57
4    */
5   package gboat2.base.cache.activator;
6   
7   import gboat2.base.cache.CacheManager;
8   
9   import org.osgi.framework.BundleActivator;
10  import org.osgi.framework.BundleContext;
11  
12  /**
13   * 
14   * bundle重启时初始化
15   * 
16   * @author zhangxj-a
17   * @since 1.0
18   * @date 2012-6-5
19   */
20  public class CacheActivator implements BundleActivator {
21  
22      @Override
23      public void start(BundleContext arg0) throws Exception {
24          CacheManager.getCache();
25      }
26  
27      @Override
28      public void stop(BundleContext arg0) throws Exception {
29          CacheManager.getCache().destroy();
30      }
31  
32  }