cziegeler 02/05/06 05:28:52 Modified: . changes.xml src/documentation cocoon.xconf src/documentation/xdocs/installing updating.xml src/java/org/apache/cocoon cocoon.roles src/java/org/apache/cocoon/components/language/markup AbstractMarkupLanguage.java src/java/org/apache/cocoon/components/pipeline CachingEventPipeline.java CachingStreamPipeline.java src/java/org/apache/cocoon/components/pipeline/impl CachingProcessingPipeline.java src/java/org/apache/cocoon/components/store FilesystemStore.java JispFilesystemStore.java MRUMemoryStore.java MemoryStore.java Store.java StoreJanitor.java StoreJanitorImpl.java src/java/org/apache/cocoon/components/xslt XSLTProcessorImpl.java src/java/org/apache/cocoon/generation StatusGenerator.java src/java/org/apache/cocoon/transformation XTTransformer.java src/java/org/apache/cocoon/webapps/portal/components PortalManager.java src/scratchpad/src/org/apache/cocoon/storejanitor StoreJanitorImpl.java src/scratchpad/src/org/apache/cocoon/transformation/pagination Paginator.java src/webapp/WEB-INF cocoon.xconf Added: lib/core avalon-excalibur-20020506.jar src/java/org/apache/cocoon/components/store/impl FilesystemStore.java Removed: lib/core avalon-excalibur-20020501.jar Log: Moved to excalibur stores Revision Changes Path 1.156 +5 -1 xml-cocoon2/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/changes.xml,v retrieving revision 1.155 retrieving revision 1.156 diff -u -r1.155 -r1.156 --- changes.xml 5 May 2002 18:14:51 -0000 1.155 +++ changes.xml 6 May 2002 12:28:48 -0000 1.156 @@ -4,7 +4,7 @@ <!-- History of Cocoon changes - $Id: changes.xml,v 1.155 2002/05/05 18:14:51 froehlich Exp $ + $Id: changes.xml,v 1.156 2002/05/06 12:28:48 cziegeler Exp $ --> <changes title="History of Changes"> @@ -37,6 +37,10 @@ </devs> <release version="@version@" date="@date@"> + <action dev="CZ" type="add"> + Integrated the new Avalon Excalibur Store and StoreJanitor components. + This deprecates the Cocoon version. + </action> <action dev="GF" type="add"> Added formula support for HSSF Serializer obtained from [EMAIL PROTECTED] (Andy Oliver). </action> 1.1 xml-cocoon2/lib/core/avalon-excalibur-20020506.jar <<Binary file>> 1.13 +8 -24 xml-cocoon2/src/documentation/cocoon.xconf Index: cocoon.xconf =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/cocoon.xconf,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- cocoon.xconf 3 May 2002 10:59:01 -0000 1.12 +++ cocoon.xconf 6 May 2002 12:28:49 -0000 1.13 @@ -20,36 +20,21 @@ </xml-parser> <!-- ============================ STORE ============================ --> - <!-- Used by compiled sitemap engine --> - <repository class="org.apache.cocoon.components.store.FilesystemStore" - logger="core.store.repository"> - <parameter name="use-work-directory" value="true"/> - </repository> - <!-- - <cache-persistent class="org.apache.cocoon.components.store.FilesystemStore" - logger="core.store.persistent"> - <parameter name="use-cache-directory" value="true"/> - </cache-persistent> - --> - - <cache-persistent class="org.apache.cocoon.components.store.JispFilesystemStore" - logger="core.store.persistent"> + <persistent-store logger="core.store.persistent"> <parameter name="use-cache-directory" value="true"/> <parameter name="datafile" value="cocoon-cache.dat"/> <parameter name="indexfile" value="cocoon-cache.idx"/> <parameter name="order" value="1701"/> - </cache-persistent> + </persistent-store> <!-- Memory Storing --> - <cache-transient class="org.apache.cocoon.components.store.MRUMemoryStore" - logger="core.store.transient"> + <transient-store logger="core.store.transient"> <parameter name="maxobjects" value="100"/> <parameter name="use-persistent-cache" value="true"/> - </cache-transient> + </transient-store> <!-- Store Janitor --> - <store-janitor class="org.apache.cocoon.components.store.StoreJanitorImpl" - logger="core.store.janitor"> + <store-janitor logger="core.store.janitor"> <parameter name="freememory" value="1000000"/> <parameter name="heapsize" value="67108864"/> <parameter name="cleanupthreadinterval" value="10"/> @@ -59,10 +44,9 @@ <!-- ============================ STORE END ========================= --> <!-- XSLT Processor --> - <xslt-stylesheet-processor logger="core.xslt-processor"> - <!-- This should be true, BUT setting this to true will crash Cocoon for now! --> - <parameter name="use-store" value="false"/> - </xslt-stylesheet-processor> + <xslt-processor logger="core.xslt-processor"> + <parameter name="use-store" value="true"/> + </xslt-processor> <!-- URL Factory: THIS COMPONENT IS DEPRECATED AND SHOULD NOT BE USED ANYMORE 1.2 +10 -1 xml-cocoon2/src/documentation/xdocs/installing/updating.xml Index: updating.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/installing/updating.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- updating.xml 3 May 2002 10:59:01 -0000 1.1 +++ updating.xml 6 May 2002 12:28:50 -0000 1.2 @@ -33,7 +33,16 @@ <p>Mention changes and update strategy...</p> </s2> <s2 title="Stores"> - <p>Mention changes and update strategy...</p> + <p>The Store and StoreJanitor components and implementations have moved to + Avalon Excalibur.</p> + <p>TODO:Changes in cocoon.xconf...</p> + <p>In general the packages changed from org.apache.cocoon.components.store + to org.apache.excalibur.store (resp. org.apache.excalibur.store.impl). So + if you have custom java code using this components, you have to change + your imports.</p> + <p>The roles PERSISTENT_CACHE and TRANSIENT_CACHE have been renamed to + PERSISTENT_STORE and TRANSIENT_STORE. The hold() method has been removed + from the Store interface.</p> </s2> <s2 title="Stream and Event Pipeline"> <p>Mention changes and update strategy...</p> 1.26 +36 -18 xml-cocoon2/src/java/org/apache/cocoon/cocoon.roles Index: cocoon.roles =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/cocoon.roles,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- cocoon.roles 4 May 2002 00:18:57 -0000 1.25 +++ cocoon.roles 6 May 2002 12:28:50 -0000 1.26 @@ -22,7 +22,7 @@ default-class="org.apache.cocoon.components.resolver.ResolverImpl"/> <role name="org.apache.avalon.excalibur.xml.xslt.XSLTProcessor" - shorthand="xslt-stylesheet-processor" + shorthand="xslt-processor" default-class="org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl"/> <role name="org.apache.avalon.excalibur.xml.xpath.XPathProcessor" @@ -33,6 +33,21 @@ shorthand="browser" default-class="org.apache.cocoon.components.browser.BrowserImpl"/> + <!-- Stores: + --> + <role name="org.apache.excalibur.store.Store" + shorthand="persistent-store" + default-class="org.apache.cocoon.components.store.impl.FilesystemStore"/> + + <role name="org.apache.excalibur.store.Store/TransientStore" + shorthand="transient-store" + default-class="org.apache.excalibur.store.impl.MRUMemoryStore"/> + + <role name="org.apache.excalibur.store.StoreJanitor" + shorthand="store-janitor" + default-class="org.apache.excalibur.store.impl.StoreJanitorImpl"/> + + <!-- For backwards compatibility, the shorthand for this role is "sitemap" <role name="org.apache.cocoon.Processor" shorthand="processor"/> @@ -44,22 +59,6 @@ shorthand="sitemap" default-class="org.apache.cocoon.components.treeprocessor.TreeProcessor"/> - <role name="org.apache.cocoon.components.store.Store/Repository" - shorthand="repository" - default-class="org.apache.cocoon.components.store.FilesystemStore"/> - - <role name="org.apache.cocoon.components.store.Store/TransientCache" - shorthand="cache-transient" - default-class="org.apache.cocoon.components.store.MRUMemoryStore"/> - - <role name="org.apache.cocoon.components.store.Store/PersistentCache" - shorthand="cache-persistent" - default-class="org.apache.cocoon.components.store.FilesystemStore"/> - - <role name="org.apache.cocoon.components.store.StoreJanitor" - shorthand="store-janitor" - default-class="org.apache.cocoon.components.store.StoreJanitorImpl"/> - <role name="org.apache.cocoon.components.language.generator.ServerPagesSelector" shorthand="server-pages" default-class="org.apache.cocoon.components.language.generator.GeneratorSelector"/> @@ -228,8 +227,27 @@ <!-- DEPRECATED, use the avalon excalibur xslt processor instead --> <role name="org.apache.cocoon.components.xslt.XSLTProcessor" - shorthand="xslt-processor" + shorthand="old-xslt-processor" default-class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"/> + <!-- DEPRECATED, use the avalon excalibur store implementation instead --> + <role name="org.apache.cocoon.components.store.Store/Repository" + shorthand="repository" + default-class="org.apache.cocoon.components.store.FilesystemStore"/> + + <!-- DEPRECATED, use the avalon excalibur store implementation instead --> + <role name="org.apache.cocoon.components.store.Store/TransientCache" + shorthand="cache-transient" + default-class="org.apache.cocoon.components.store.MRUMemoryStore"/> + + <!-- DEPRECATED, use the avalon excalibur store implementation instead --> + <role name="org.apache.cocoon.components.store.Store/PersistentCache" + shorthand="cache-persistent" + default-class="org.apache.cocoon.components.store.FilesystemStore"/> + + <!-- DEPRECATED, use the avalon excalibur store implementation instead --> + <role name="org.apache.cocoon.components.store.StoreJanitor" + shorthand="old-store-janitor" + default-class="org.apache.cocoon.components.store.StoreJanitorImpl"/> </role-list> 1.17 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java Index: AbstractMarkupLanguage.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/AbstractMarkupLanguage.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- AbstractMarkupLanguage.java 29 Apr 2002 12:53:16 -0000 1.16 +++ AbstractMarkupLanguage.java 6 May 2002 12:28:50 -0000 1.17 @@ -69,7 +69,7 @@ import org.apache.cocoon.ProcessingException; import org.apache.cocoon.components.language.programming.ProgrammingLanguage; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.util.HashMap; import org.xml.sax.Attributes; @@ -96,7 +96,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a> * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a> - * @version CVS $Id: AbstractMarkupLanguage.java,v 1.16 2002/04/29 12:53:16 cziegeler Exp $ + * @version CVS $Id: AbstractMarkupLanguage.java,v 1.17 2002/05/06 12:28:50 cziegeler Exp $ */ public abstract class AbstractMarkupLanguage extends AbstractLoggable @@ -227,7 +227,7 @@ this.manager = manager; // Initialize logicsheet cache - this.logicsheetCache = (Store) manager.lookup(Store.TRANSIENT_CACHE); + this.logicsheetCache = (Store) manager.lookup(Store.TRANSIENT_STORE); // Initialize the source resolver this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE); 1.10 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java Index: CachingEventPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CachingEventPipeline.java 6 Apr 2002 17:57:54 -0000 1.9 +++ CachingEventPipeline.java 6 May 2002 12:28:50 -0000 1.10 @@ -61,7 +61,7 @@ import org.apache.cocoon.components.sax.XMLSerializer; import org.apache.cocoon.components.sax.XMLTeePipe; import org.apache.cocoon.components.saxconnector.SAXConnector; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.environment.Environment; import org.apache.cocoon.transformation.Transformer; import org.apache.cocoon.xml.XMLConsumer; @@ -83,7 +83,7 @@ * does not cache! (If it would cache, the response would be cached twice!) * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> - * @version CVS $Id: CachingEventPipeline.java,v 1.9 2002/04/06 17:57:54 vgritsenko Exp $ + * @version CVS $Id: CachingEventPipeline.java,v 1.10 2002/05/06 12:28:50 cziegeler Exp $ */ public class CachingEventPipeline extends AbstractEventPipeline @@ -106,7 +106,7 @@ public void compose (ComponentManager manager) throws ComponentException { super.compose(manager); - this.eventCache = (Store)this.manager.lookup(Store.TRANSIENT_CACHE); + this.eventCache = (Store)this.manager.lookup(Store.TRANSIENT_STORE); } /** 1.9 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java Index: CachingStreamPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- CachingStreamPipeline.java 13 Mar 2002 11:03:37 -0000 1.8 +++ CachingStreamPipeline.java 6 May 2002 12:28:50 -0000 1.9 @@ -57,7 +57,7 @@ import org.apache.cocoon.ConnectionResetException; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.caching.*; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.environment.Environment; import org.xml.sax.SAXException; @@ -84,7 +84,7 @@ * </ul> * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> - * @version CVS $Id: CachingStreamPipeline.java,v 1.8 2002/03/13 11:03:37 cziegeler Exp $ + * @version CVS $Id: CachingStreamPipeline.java,v 1.9 2002/05/06 12:28:50 cziegeler Exp $ */ public class CachingStreamPipeline extends AbstractStreamPipeline { @@ -100,7 +100,7 @@ public void compose (ComponentManager manager) throws ComponentException { super.compose(manager); - this.streamCache = (Store)this.manager.lookup(Store.TRANSIENT_CACHE); + this.streamCache = (Store)this.manager.lookup(Store.TRANSIENT_STORE); } public void dispose() { 1.4 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/CachingProcessingPipeline.java Index: CachingProcessingPipeline.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/impl/CachingProcessingPipeline.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- CachingProcessingPipeline.java 3 May 2002 15:31:28 -0000 1.3 +++ CachingProcessingPipeline.java 6 May 2002 12:28:50 -0000 1.4 @@ -66,7 +66,7 @@ import org.apache.cocoon.components.sax.XMLSerializer; import org.apache.cocoon.components.sax.XMLTeePipe; import org.apache.cocoon.components.saxconnector.SAXConnector; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.environment.Environment; import org.apache.cocoon.transformation.Transformer; import org.apache.cocoon.xml.XMLConsumer; @@ -87,7 +87,7 @@ * * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> - * @version CVS $Id: CachingProcessingPipeline.java,v 1.3 2002/05/03 15:31:28 cziegeler Exp $ + * @version CVS $Id: CachingProcessingPipeline.java,v 1.4 2002/05/06 12:28:50 cziegeler Exp $ */ public class CachingProcessingPipeline extends AbstractProcessingPipeline @@ -120,7 +120,7 @@ public void compose (ComponentManager manager) throws ComponentException { super.compose(manager); - this.cache = (Store)this.manager.lookup(Store.TRANSIENT_CACHE); + this.cache = (Store)this.manager.lookup(Store.TRANSIENT_STORE); } /** 1.15 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java Index: FilesystemStore.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- FilesystemStore.java 28 Mar 2002 09:56:58 -0000 1.14 +++ FilesystemStore.java 6 May 2002 12:28:50 -0000 1.15 @@ -71,9 +71,11 @@ * Stores objects on the filesystem: String objects as text files, * all other objects are serialized. * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author ? * @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a> - * @version CVS $Id: FilesystemStore.java,v 1.14 2002/03/28 09:56:58 cziegeler Exp $ + * @version CVS $Id: FilesystemStore.java,v 1.15 2002/05/06 12:28:50 cziegeler Exp $ */ public final class FilesystemStore extends AbstractLoggable 1.3 +6 -2 xml-cocoon2/src/java/org/apache/cocoon/components/store/JispFilesystemStore.java Index: JispFilesystemStore.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/JispFilesystemStore.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- JispFilesystemStore.java 22 Feb 2002 07:00:13 -0000 1.2 +++ JispFilesystemStore.java 6 May 2002 12:28:50 -0000 1.3 @@ -81,11 +81,15 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Gerhard Froehlich</a> * @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a> - * @version CVS $Id: JispFilesystemStore.java,v 1.2 2002/02/22 07:00:13 cziegeler Exp $ + * @version CVS $Id: JispFilesystemStore.java,v 1.3 2002/05/06 12:28:50 cziegeler Exp $ */ public final class JispFilesystemStore extends AbstractLoggable -implements Store, Contextualizable, ThreadSafe, Initializable, Parameterizable { +implements org.apache.excalibur.store.Store, + Contextualizable, + ThreadSafe, + Initializable, + Parameterizable { protected File workDir; protected File cacheDir; 1.16 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java Index: MRUMemoryStore.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- MRUMemoryStore.java 28 Mar 2002 09:56:58 -0000 1.15 +++ MRUMemoryStore.java 6 May 2002 12:28:50 -0000 1.16 @@ -77,10 +77,12 @@ * The idea was taken from the "Writing Advanced Application Tutorial" from * javasoft. Many thanx to the writers! * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author <a href="mailto:[EMAIL PROTECTED]">Gerhard Froehlich</a> * @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a> * @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a> - * @version CVS $Id: MRUMemoryStore.java,v 1.15 2002/03/28 09:56:58 cziegeler Exp $ + * @version CVS $Id: MRUMemoryStore.java,v 1.16 2002/05/06 12:28:50 cziegeler Exp $ */ public final class MRUMemoryStore extends AbstractLoggable 1.8 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/MemoryStore.java Index: MemoryStore.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/MemoryStore.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- MemoryStore.java 28 Mar 2002 09:56:58 -0000 1.7 +++ MemoryStore.java 6 May 2002 12:28:50 -0000 1.8 @@ -57,13 +57,15 @@ /** * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author <a href="mailto:[EMAIL PROTECTED]">Federico Barbieri</a> * (Betaversion Productions) * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> * (Apache Software Foundation) * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a> * (Apache Software Foundation, Exoffice Technologies) - * @version CVS $Id: MemoryStore.java,v 1.7 2002/03/28 09:56:58 cziegeler Exp $ + * @version CVS $Id: MemoryStore.java,v 1.8 2002/05/06 12:28:50 cziegeler Exp $ */ public class MemoryStore implements Store, ThreadSafe { /* WARNING: Hashtable is threadsafe, whereas HashMap is not. 1.7 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/Store.java Index: Store.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/Store.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Store.java 22 Feb 2002 07:00:13 -0000 1.6 +++ Store.java 6 May 2002 12:28:50 -0000 1.7 @@ -57,13 +57,15 @@ /** * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author <a href="mailto:[EMAIL PROTECTED]">Federico Barbieri</a> * (Betaversion Productions) * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> * (Apache Software Foundation) * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a> * (Apache Software Foundation, Exoffice Technologies) - * @version CVS $Id: Store.java,v 1.6 2002/02/22 07:00:13 cziegeler Exp $ + * @version CVS $Id: Store.java,v 1.7 2002/05/06 12:28:50 cziegeler Exp $ */ public interface Store extends Component { 1.5 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitor.java Index: StoreJanitor.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StoreJanitor.java 22 Feb 2002 07:00:14 -0000 1.4 +++ StoreJanitor.java 6 May 2002 12:28:50 -0000 1.5 @@ -56,8 +56,10 @@ /** * Interface for the StoreJanitors * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author <a href="mailto:[EMAIL PROTECTED]">Gerhard Froehlich</a> - * @version CVS $Id: StoreJanitor.java,v 1.4 2002/02/22 07:00:14 cziegeler Exp $ + * @version CVS $Id: StoreJanitor.java,v 1.5 2002/05/06 12:28:50 cziegeler Exp $ */ public interface StoreJanitor extends Component { 1.13 +3 -1 xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java Index: StoreJanitorImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- StoreJanitorImpl.java 27 Apr 2002 18:31:53 -0000 1.12 +++ StoreJanitorImpl.java 6 May 2002 12:28:51 -0000 1.13 @@ -66,10 +66,12 @@ * can register to the StoreJanitor. When memory is too low, * the StoreJanitor frees the registered caches until memory is normal. * + * @deprecated Use the Avalon Excalibur Store instead. + * * @author <a href="mailto:[EMAIL PROTECTED]">Christian Schmitt</a> * @author <a href="mailto:[EMAIL PROTECTED]">Gerhard Froehlich</a> * @author <a href="mailto:[EMAIL PROTECTED]">Peter Royal</a> - * @version CVS $Id: StoreJanitorImpl.java,v 1.12 2002/04/27 18:31:53 vgritsenko Exp $ + * @version CVS $Id: StoreJanitorImpl.java,v 1.13 2002/05/06 12:28:51 cziegeler Exp $ */ public class StoreJanitorImpl extends AbstractLoggable 1.1 xml-cocoon2/src/java/org/apache/cocoon/components/store/impl/FilesystemStore.java Index: FilesystemStore.java =================================================================== /* ============================================================================ The Apache Software License, Version 1.1 ============================================================================ Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. */ package org.apache.cocoon.components.store.impl; import org.apache.excalibur.store.impl.AbstractFilesystemStore; import org.apache.avalon.framework.context.Context; import org.apache.avalon.framework.context.ContextException; import org.apache.avalon.framework.context.Contextualizable; import org.apache.avalon.framework.parameters.Parameterizable; import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.parameters.ParameterException; import org.apache.cocoon.Constants; import org.apache.cocoon.util.IOUtils; import java.io.File; import java.io.IOException; /** * Stores objects on the filesystem: String objects as text files, * all other objects are serialized. * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> * @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a> * @version CVS $Id: FilesystemStore.java,v 1.1 2002/05/06 12:28:51 cziegeler Exp $ */ public final class FilesystemStore extends AbstractFilesystemStore implements Contextualizable, Parameterizable { protected File workDir; protected File cacheDir; public void contextualize(final Context context) throws ContextException { this.workDir = (File)context.get(Constants.CONTEXT_WORK_DIR); this.cacheDir = (File)context.get(Constants.CONTEXT_CACHE_DIR); } public void parameterize(Parameters params) throws ParameterException { try { if (params.getParameterAsBoolean("use-cache-directory", false)) { if (this.getLogger().isDebugEnabled()) getLogger().debug("Using cache directory: " + cacheDir); setDirectory(cacheDir); } else if (params.getParameterAsBoolean("use-work-directory", false)) { if (this.getLogger().isDebugEnabled()) getLogger().debug("Using work directory: " + workDir); setDirectory(workDir); } else if (params.getParameter("directory", null) != null) { String dir = params.getParameter("directory"); dir = IOUtils.getContextFilePath(workDir.getPath(), dir); if (this.getLogger().isDebugEnabled()) getLogger().debug("Using directory: " + dir); setDirectory(new File(dir)); } else { try { // Legacy: use working directory by default setDirectory(workDir); } catch (IOException e) { // Legacy: Always was ignored } } } catch (IOException e) { throw new ParameterException("Unable to set directory", e); } } } 1.23 +4 -4 xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java Index: XSLTProcessorImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- XSLTProcessorImpl.java 2 May 2002 12:09:21 -0000 1.22 +++ XSLTProcessorImpl.java 6 May 2002 12:28:51 -0000 1.23 @@ -65,7 +65,7 @@ import org.apache.cocoon.ResourceNotFoundException; import org.apache.cocoon.ProcessingException; import org.apache.cocoon.components.source.SourceUtil; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.util.ClassUtils; import org.apache.cocoon.util.TraxErrorHandler; import org.xml.sax.InputSource; @@ -115,7 +115,7 @@ * @deprecated Use the avalon excalibur xslt processor instead. * @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a> * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version CVS $Id: XSLTProcessorImpl.java,v 1.22 2002/05/02 12:09:21 cziegeler Exp $ + * @version CVS $Id: XSLTProcessorImpl.java,v 1.23 2002/05/06 12:28:51 cziegeler Exp $ * @version 1.0 * @since July 11, 2001 */ @@ -157,7 +157,7 @@ throws ComponentException { this.manager = manager; this.getLogger().debug("XSLTProcessorImpl component initialized."); - this.store = (Store) manager.lookup(Store.TRANSIENT_CACHE); + this.store = (Store) manager.lookup(Store.TRANSIENT_STORE); this.errorHandler = new TraxErrorHandler( this.getLogger() ); this.resolver = (SourceResolver) manager.lookup(SourceResolver.ROLE); } @@ -419,7 +419,7 @@ Object[] templateAndTime = new Object[2]; templateAndTime[0] = templates; templateAndTime[1] = new Long(stylesheet.getLastModified()); - store.hold(id, templateAndTime); + store.store(id, templateAndTime); } } 1.6 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/generation/StatusGenerator.java Index: StatusGenerator.java =================================================================== RCS file: /home/cvs/xml-cocoon2/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 22 Feb 2002 07:03:51 -0000 1.5 +++ StatusGenerator.java 6 May 2002 12:28:51 -0000 1.6 @@ -54,8 +54,8 @@ import org.apache.avalon.framework.component.ComponentManager; import org.apache.avalon.framework.component.Composable; -import org.apache.cocoon.components.store.StoreJanitor; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; +import org.apache.excalibur.store.StoreJanitor; import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; @@ -94,7 +94,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Paul Russell</a> (Luminas Limited) * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> * @author <a href="mailto:[EMAIL PROTECTED]">Sébastien Kœchlin</a> (iVision) - * @version CVS $Id: StatusGenerator.java,v 1.5 2002/02/22 07:03:51 cziegeler Exp $ + * @version CVS $Id: StatusGenerator.java,v 1.6 2002/05/06 12:28:51 cziegeler Exp $ */ public class StatusGenerator extends ComposerGenerator { 1.10 +4 -4 xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java Index: XTTransformer.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/XTTransformer.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- XTTransformer.java 22 Feb 2002 07:03:56 -0000 1.9 +++ XTTransformer.java 6 May 2002 12:28:52 -0000 1.10 @@ -66,7 +66,7 @@ import org.apache.avalon.framework.parameters.Parameters; import org.apache.cocoon.Modifiable; import org.apache.cocoon.ProcessingException; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.components.url.URLFactory; import org.apache.cocoon.environment.Source; import org.apache.cocoon.environment.SourceResolver; @@ -90,7 +90,7 @@ * This Transformer use the XT processor. * * @author <a href="mailto:[EMAIL PROTECTED]">Sahuc Sebastien</a> - * @version CVS $Id: XTTransformer.java,v 1.9 2002/02/22 07:03:56 cziegeler Exp $ + * @version CVS $Id: XTTransformer.java,v 1.10 2002/05/06 12:28:52 cziegeler Exp $ */ public class XTTransformer extends DocumentHandlerWrapper implements Transformer, Composable, Loggable, Disposable { @@ -122,10 +122,10 @@ this.manager = manager; try { - this.store = (Store) manager.lookup(Store.TRANSIENT_CACHE); + this.store = (Store) manager.lookup(Store.TRANSIENT_STORE); } catch (Exception e) { log.error("Could not find component for role " - + Store.TRANSIENT_CACHE, e); + + Store.TRANSIENT_STORE, e); } } 1.4 +2 -2 xml-cocoon2/src/java/org/apache/cocoon/webapps/portal/components/PortalManager.java Index: PortalManager.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/portal/components/PortalManager.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PortalManager.java 23 Apr 2002 08:01:23 -0000 1.3 +++ PortalManager.java 6 May 2002 12:28:52 -0000 1.4 @@ -68,7 +68,7 @@ import org.apache.cocoon.ProcessingException; import org.apache.cocoon.components.sax.XMLDeserializer; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.environment.Redirector; import org.apache.cocoon.environment.Session; import org.apache.cocoon.environment.SourceResolver; @@ -105,7 +105,7 @@ * This is the basis portal component * * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a> - * @version CVS $Id: PortalManager.java,v 1.3 2002/04/23 08:01:23 cziegeler Exp $ + * @version CVS $Id: PortalManager.java,v 1.4 2002/05/06 12:28:52 cziegeler Exp $ */ public final class PortalManager extends AbstractSessionComponent { 1.3 +3 -3 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/storejanitor/StoreJanitorImpl.java Index: StoreJanitorImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/storejanitor/StoreJanitorImpl.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- StoreJanitorImpl.java 22 Feb 2002 06:58:03 -0000 1.2 +++ StoreJanitorImpl.java 6 May 2002 12:28:52 -0000 1.3 @@ -58,8 +58,8 @@ import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.thread.ThreadSafe; -import org.apache.cocoon.components.store.StoreJanitor; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; +import org.apache.excalibur.store.StoreJanitor; import java.util.ArrayList; import java.util.Enumeration; @@ -75,7 +75,7 @@ *@author <a href="mailto:[EMAIL PROTECTED]">Peter Royal</a> *@author <a href="mailto:[EMAIL PROTECTED]">Peter Hargreaves</a> * - *@version CVS $Id: StoreJanitorImpl.java,v 1.2 2002/02/22 06:58:03 cziegeler Exp $ + *@version CVS $Id: StoreJanitorImpl.java,v 1.3 2002/05/06 12:28:52 cziegeler Exp $ */ public class StoreJanitorImpl extends AbstractLoggable 1.8 +13 -13 xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java Index: Paginator.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/pagination/Paginator.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Paginator.java 29 Mar 2002 20:12:08 -0000 1.7 +++ Paginator.java 6 May 2002 12:28:52 -0000 1.8 @@ -3,34 +3,34 @@ ============================================================================ The Apache Software License, Version 1.1 ============================================================================ - + Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved. - + Redistribution and use in source and binary forms, with or without modifica- tion, are permitted provided that the following conditions are met: - + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - + 4. The names "Apache Cocoon" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] - + 5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. - + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE @@ -41,12 +41,12 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation and was originally created by - Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache + Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache Software Foundation, please see <http://www.apache.org/>. - + */ package org.apache.cocoon.transformation.pagination; @@ -72,7 +72,7 @@ import org.apache.cocoon.caching.ParametersCacheValidity; import org.apache.cocoon.caching.TimeStampCacheValidity; import org.apache.cocoon.components.parser.Parser; -import org.apache.cocoon.components.store.Store; +import org.apache.excalibur.store.Store; import org.apache.cocoon.environment.Request; import org.apache.cocoon.environment.Source; import org.apache.cocoon.environment.SourceResolver; @@ -90,7 +90,7 @@ * A paginating transformer. * * @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a> - * @version CVS $Revision: 1.7 $ $Date: 2002/03/29 20:12:08 $ + * @version CVS $Revision: 1.8 $ $Date: 2002/05/06 12:28:52 $ */ public class Paginator extends AbstractTransformer implements Composable, Disposable, Cacheable { 1.18 +8 -10 xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf Index: cocoon.xconf =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/WEB-INF/cocoon.xconf,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- cocoon.xconf 4 May 2002 00:33:07 -0000 1.17 +++ cocoon.xconf 6 May 2002 12:28:52 -0000 1.18 @@ -72,7 +72,7 @@ from: * FilesystemStore: Simple. Dependable. Thorougly tested. * JispFilesystemStore: Scalable. New kid on the block. - + Common configuration parameters: use-cache-directory: Indicates that cache directory specified in web.xml should be used. @@ -81,14 +81,12 @@ directory: Specifies directory to use. Absolute or relative to the work directory. --> - <cache-persistent class="org.apache.cocoon.components.store.FilesystemStore" - logger="core.store.persistent"> + <persistent-store logger="core.store.persistent"> <parameter name="use-cache-directory" value="true"/> - </cache-persistent> + </persistent-store> <!-- Memory Storing: --> - <cache-transient class="org.apache.cocoon.components.store.MRUMemoryStore" - logger="core.store.transient"> + <transient-store logger="core.store.transient"> <!-- Indicates how many objects will be hold in the cache. When the number of maxobjects has been reached. The last object in the cache will be thrown out. --> @@ -97,7 +95,7 @@ <!-- Turns the swapping of the objects into persistent cache on and off. --> <parameter name="use-persistent-cache" value="true"/> - </cache-transient> + </transient-store> <!-- Store Janitor: Be careful with the heapsize and freememory parameters. Wrong values can @@ -133,10 +131,10 @@ For Xalan: Turn 'incremental-processing' to true if you want a continous output (if set to false the transformer delivers SAX events after all transformations has been done). --> - <xslt-stylesheet-processor logger="core.xslt-processor"> - <parameter name="use-store" value="false"/> <!-- Setting this to true will crash Cocoon for now! --> + <xslt-processor logger="core.xslt-processor"> + <parameter name="use-store" value="false"/> <parameter name="incremental-processing" value="true"/> - </xslt-stylesheet-processor> + </xslt-processor> <!-- Xpath Processor: -->
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]