cziegeler    2004/05/19 01:44:27

  Modified:    src/blocks/eventcache/java/org/apache/cocoon/caching/impl
                        StoreEventRegistryImpl.java
               src/java/org/apache/cocoon/acting
                        ClearPersistentStoreAction.java
               src/webapp/WEB-INF cocoon.xconf
               src/java/org/apache/cocoon/generation StatusGenerator.java
               src/java/org/apache/cocoon cocoon.roles
  Log:
  We don't need a persistent store if we use JCS/EHCache
  (We can revert the changes to StatusGenerator/Action if required)
  
  Revision  Changes    Path
  1.8       +2 -2      
cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/StoreEventRegistryImpl.java
  
  Index: StoreEventRegistryImpl.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/eventcache/java/org/apache/cocoon/caching/impl/StoreEventRegistryImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StoreEventRegistryImpl.java       5 Mar 2004 13:01:56 -0000       1.7
  +++ StoreEventRegistryImpl.java       19 May 2004 08:44:26 -0000      1.8
  @@ -54,7 +54,7 @@
         */
       public void service(ServiceManager manager) throws ServiceException {
           this.m_manager = manager;
  -        this.m_persistentStore = (Store) 
manager.lookup(Store.PERSISTENT_STORE);
  +        this.m_persistentStore = (Store) manager.lookup(Store.ROLE);
       }
   
       /**
  
  
  
  1.4       +2 -2      
cocoon-2.1/src/java/org/apache/cocoon/acting/ClearPersistentStoreAction.java
  
  Index: ClearPersistentStoreAction.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/acting/ClearPersistentStoreAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClearPersistentStoreAction.java   5 Mar 2004 13:02:43 -0000       1.3
  +++ ClearPersistentStoreAction.java   19 May 2004 08:44:26 -0000      1.4
  @@ -37,7 +37,7 @@
                       String src,
                       Parameters par
       ) throws Exception {
  -        Store store_persistent = 
(Store)this.manager.lookup(Store.PERSISTENT_STORE);
  +        Store store_persistent = (Store)this.manager.lookup(Store.ROLE);
   
           try {
               store_persistent.clear();
  
  
  
  1.47      +2 -23     cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/webapp/WEB-INF/cocoon.xconf,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- cocoon.xconf      17 May 2004 14:38:27 -0000      1.46
  +++ cocoon.xconf      19 May 2004 08:44:27 -0000      1.47
  @@ -428,7 +428,7 @@
     
     <!--+
         | Store: generic store. The default implementation is an in-memory 
store
  -      | backed by the persistent store (see below). This forms a two-stage
  +      | backed by a disk store (based on JCS). This forms a two-stage
         | cache composed of a fast in-memory MRU front-end and a persistent
         | back-end which stores the less-used objects.
         |
  @@ -437,31 +437,10 @@
         |    When the number of maxobjects has been reached. The last object
         |    in the cache will be thrown out.
         +-->
  -  <store class="org.apache.cocoon.components.store.impl.JCSDefaultStore" 
  -         logger="core.store">
  +  <store logger="core.store">
       <parameter name="maxobjects" value="1000"/>
       <parameter name="use-cache-directory" value="true"/>
     </store>
  -
  -  <!--+
  -      | Persistent Store: holds objects that have to survive shutdown.
  -      | WARNING: FilesystemStore and JispStore are broken. Cocoon uses 
  -      | JCSPersistentStore based on Jakarta JCS instead.
  -      |
  -      | Common configuration parameters:
  -      |  use-cache-directory: Indicates that cache directory specified in
  -      |                       web.xml should be used.
  -      |  use-work-directory: Indicates that work directory specified in
  -      |                      web.xml should be used.
  -      |  directory: Specifies directory to use. Absolute or relative to the
  -      |             work directory.
  -      |
  -      +-->
  -  <persistent-store 
class="org.apache.cocoon.components.store.impl.JCSDefaultStore"
  -                    logger="core.store.persistent">
  -    <parameter name="use-cache-directory" value="true"/>
  -    <parameter name="maxobjects" value="1000"/>
  -  </persistent-store>
   
     <!--+
         | Store Janitor: the store garbage collector and memory usage 
controller.
  
  
  
  1.6       +2 -2      
cocoon-2.1/src/java/org/apache/cocoon/generation/StatusGenerator.java
  
  Index: StatusGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/generation/StatusGenerator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StatusGenerator.java      1 Apr 2004 12:11:26 -0000       1.5
  +++ StatusGenerator.java      19 May 2004 08:44:27 -0000      1.6
  @@ -101,7 +101,7 @@
           super.service(manager);
           try {
               this.storejanitor = 
(StoreJanitor)manager.lookup(StoreJanitor.ROLE);
  -            this.store_persistent = 
(Store)this.manager.lookup(Store.PERSISTENT_STORE);
  +            this.store_persistent = (Store)this.manager.lookup(Store.ROLE);
           } catch(ServiceException ce) {
               getLogger().info("StoreJanitor is not available. Sorry, no cache 
statistics");
           }
  
  
  
  1.15      +9 -5      cocoon-2.1/src/java/org/apache/cocoon/cocoon.roles
  
  Index: cocoon.roles
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/cocoon.roles,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- cocoon.roles      10 Mar 2004 12:58:09 -0000      1.14
  +++ cocoon.roles      19 May 2004 08:44:27 -0000      1.15
  @@ -77,16 +77,20 @@
     <!-- Stores: -->
     <role name="org.apache.excalibur.store.Store"
          shorthand="store"
  -       default-class="org.apache.cocoon.components.store.impl.DefaultStore"/>
  -
  -  <role name="org.apache.excalibur.store.Store/PersistentStore"
  -        shorthand="persistent-store"
  -        
default-class="org.apache.cocoon.components.store.impl.DefaultPersistentStore"/>
  +       
default-class="org.apache.cocoon.components.store.impl.JCSDefaultStore"/>
   
     <role name="org.apache.excalibur.store.Store/TransientStore"
           shorthand="transient-store"
           
default-class="org.apache.cocoon.components.store.impl.DefaultTransientStore"/>
   
  +<!--
  +  The persistent store is only an auxiliary store that shouldn't be
  +  used by Cocoon users. It should only be used - if required - by
  +  the Store. If we use JCS, we don't need a persistent store.
  +  <role name="org.apache.excalibur.store.Store/PersistentStore"
  +        shorthand="persistent-store"
  +        
default-class="org.apache.cocoon.components.store.impl.DefaultPersistentStore"/>
  +-->
     <role name="org.apache.excalibur.store.StoreJanitor"
          shorthand="store-janitor"
          default-class="org.apache.excalibur.store.impl.StoreJanitorImpl"/>
  
  
  

Reply via email to