cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gerhard" <g-froehl...@gmx.de>
Subject NotSerializableException in MemoryStore
Date Sat, 05 May 2001 14:48:38 GMT
Hi,
I'm broaden the MRUMemoryCache. My idea is not to limit the number
of objects rather the size in bytes. Ok there is no sizeof method in java.
Because of that I have to serialize every object which wanted to be
holden in the cache to get the size in bytes.

My problem is that some objects doesn't implement the serializable interface.
Like instances of CachedStreamObject. When I serialize those object I get
a NotSerializableException. That's understandably :-). How could I solve this
problem nicly.
My first idea:
CachedStreamObject  implements Serializable
...

But I don't know if there are any more classes, where the serializable interface
have to be implemented for determine there size in bytes.

Better ideas, suggestions?
cheers
Gerhard

[cocoon  ] (Thread-9): Caching content for further requests of 'sites/java.apache.org'.
DEBUG   34521   [cocoon  ] (Thread-9): Retrieving a org.apache.cocoon.components.saxconnector.XIncludeSAXConnector
from
the pool
DEBUG   34521   [cocoon  ] (Thread-9): Retrieving a org.apache.cocoon.components.saxconnector.XIncludeSAXConnector
from
the pool
DEBUG   34522   [cocoon  ] (Thread-9): Creating new Templates in org.apache.cocoon.transformation.TraxTransformer@3bd574
forfile:/H:/xml-cocoon/build/cocoon/webapp/stylesheets/sites/java_apache_org-html.xsl:stylesheets/sites/java_apache_org-
html.xsl
DEBUG   34618   [cocoon  ] (Thread-9): size of Object: 17618
DEBUG   34619   [cocoon  ] (Thread-9): objectsize = 17618
DEBUG   34619   [cocoon  ] (Thread-9): sizeofstore = 46797
DEBUG   34619   [cocoon  ] (Thread-9): Holding object in memory. Key: stylesheets/sites/java_apache_org-html.xsl
DEBUG   34622   [cocoon  ] (Thread-9): processing file docs/samples/sites/java_apache_org.xml
DEBUG   34622   [cocoon  ] (Thread-9): file resolved to
file:/H:/xml-cocoon/build/cocoon/webapp/docs/samples/sites/java_apache_org.xml
DEBUG   34623   [cocoon  ] (Thread-9): Retrieving a org.apache.cocoon.components.parser.JaxpParser
from the pool
DEBUG   34649   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.components.parser.JaxpParser
to the pool
ERROR   34650   [cocoon  ] (Thread-9): IOException in MemoryStore: java.io.NotSerializableException:
org.apache.cocoon.caching.CachedStreamObject
DEBUG   34650   [cocoon  ] (Thread-9): objectsize = -1
DEBUG   34651   [cocoon  ] (Thread-9): sizeofstore = -3
DEBUG   34651   [cocoon  ] (Thread-9): Holding object in memory. Key:
PCK:CCK:3-html-1PCK:CCK:1-file-5293980501188796697CCK:2-xslt--7581984525331385474
DEBUG   34652   [cocoon  ] (Thread-9): Recycling of CachingEventPipeline
DEBUG   34652   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.generation.FileGenerator
to the pool
DEBUG   34652   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.transformation.TraxTransformer
to the pool
DEBUG   34653   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.components.saxconnector.XIncludeSAXConnector
to the
pool
DEBUG   34653   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.components.saxconnector.XIncludeSAXConnector
to the
pool
DEBUG   34653   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.components.pipeline.CachingEventPipeline
to the
pool
DEBUG   34653   [cocoon  ] (Thread-9): Recycling of CachingStreamPipeline
DEBUG   34654   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.serialization.HTMLSerializer
to the pool
DEBUG   34654   [cocoon  ] (Thread-9): Returning a org.apache.cocoon.components.pipeline.CachingStreamPipeline
to the
pool
INFO    34654   [cocoon  ] (Thread-9): 'sites/java.apache.org' Processed by Apache Cocoon
2.0a5 in 1.452 seconds.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message