cziegeler 01/07/20 03:27:32
Modified: src/org/apache/cocoon/components/store MRUMemoryStore.java
xdocs docs-book.xml site-book.xml
Log:
Appliedd latest patch and docs
Submitted by: Gerhard Froehlich
Revision Changes Path
1.7 +16 -10
xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java
Index: MRUMemoryStore.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/store/MRUMemoryStore.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MRUMemoryStore.java 2001/07/18 10:44:26 1.6
+++ MRUMemoryStore.java 2001/07/20 10:27:32 1.7
@@ -21,7 +21,6 @@
import org.apache.cocoon.util.ClassUtils;
import org.apache.cocoon.util.IOUtils;
-
import org.apache.avalon.framework.component.Component;
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
@@ -98,13 +97,17 @@
private Runtime jvm;
+ /**
+ * Filesystem storage;
+ */
private File cachefile;
private Store fsstore;
private Stack writerstack;
private Thread writer;
private File cachedir;
+ private File workdir;
private String cachedirstr;
-
+
/** the component manager */
protected ComponentManager manager;
@@ -126,15 +129,16 @@
*/
public void contextualize(Context context) throws ContextException {
this.cachedirstr = new String();
+
try {
this.cachedir = (File)context.get(Constants.CONTEXT_CACHE_DIR);
- StringTokenizer stizer = new
StringTokenizer(this.cachedir.getPath(),this.cachedir.separator);
- Vector v = new Vector();
- while (stizer.hasMoreTokens()) {
- v.add(stizer.nextToken());
- }
- cachedirstr = (String)v.lastElement();
- getLogger().debug("MRUMemoryStore contextualize strcachedir=" +
this.cachedirstr);
+ this.workdir = (File)context.get(Constants.CONTEXT_WORK_DIR);
+ this.cachedirstr = IOUtils.getContextFilePath(this.workdir.getPath(),
+ this.cachedir.getPath());
+
+ getLogger().debug("MRUMemoryStore context path="
+ +
IOUtils.getContextFilePath(this.workdir.getPath(),this.cachedir.getPath()));
+
} catch (Exception e) {
getLogger().error("Error in MRUMemoryStore()",e);
}
@@ -378,7 +382,9 @@
}
/**
- * This method checks if an object is seriazable
+ * This method checks if an object is seriazable.
+ * FIXME: In the moment only CachedEventObject or
+ * CachedStreamObject are stored.
*/
private boolean checkSeriazable(Object object) {
try {
1.19 +1 -0 xml-cocoon2/xdocs/docs-book.xml
Index: docs-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/docs-book.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- docs-book.xml 2001/07/19 13:47:19 1.18
+++ docs-book.xml 2001/07/20 10:27:32 1.19
@@ -62,6 +62,7 @@
<page id="flow" label="Flow" source="httprequest.xml"/>
<page id="caching" label="Caching" source="caching.xml"/>
+ <page id="mrustore" label="MRU Store" source="mrustore.xml"/>
<page id="sessions" label="Sessions" source="sessions.xml"/>
<page id="datasources" label="Using Databases" source="datasources.xml"/>
<page id="extending" label="Extending C2" source="extending.xml"/>
1.22 +1 -0 xml-cocoon2/xdocs/site-book.xml
Index: site-book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/site-book.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- site-book.xml 2001/07/19 14:20:23 1.21
+++ site-book.xml 2001/07/20 10:27:32 1.22
@@ -65,6 +65,7 @@
<page id="flow" label="Flow" source="httprequest.xml"/>
<page id="caching" label="Caching" source="caching.xml"/>
+ <page id="mrustore" label="MRU Store" source="mrustore.xml"/>
<page id="sessions" label="Sessions" source="sessions.xml"/>
<page id="datasources" label="Using Databases" source="datasources.xml"/>
<page id="extending" label="Extending C2" source="extending.xml"/>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]