Thanks Guido,
I have now implemented the getLasModified() in the servlet.. arh ups :)
which works like a charm if i do this:
<map:match pattern="readXML">
<map:read src="http://servletserver/genXML" mime-type="text/xml"/>
</map:match>
<map:match pattern="test2">
<map:generate src="http://cocoonserver/readXML"/>
<map:transform src="stylesheets/transform.xsl"/>
<map:serialize/>
</map:match>
but if i try to do this:
<map:match pattern="test">
<map:generate src="http://servletserver/genXML"/>
<map:transform src="stylesheets/transform.xsl"/>
<map:serialize/>
</map:match>
It seems the transformation get a blank document, so i get a "the root
element is required".
I can use the 1st so it is not really a problem, im just currious!
should the 2nd not be possible.
Thanks alot. my pequest time time has been reduced from 10-15 to neglectable.
:))
cheers
JEsper
[EMAIL PROTECTED] wrote:
> Did you implement getLastModified() ?
>
> Guido
>
> jr schrieb:
> > Hi all,
> > I have a system where i have a servlet generating xml from some ejb's
> > I use cocoon to apply xsl to the xml and produce the various outputs.
> > I have tried two methods, and both works fine, but i need to cache the
> > result ans the servlet is QUITE slow and rarely changes its output.
> >
> > i have tried this:
> >
> > <map:match pattern="test">
> > <map:generate src="http://server/genXML"/>
> > <map:transform src="stylesheets/transform.xsl"/>
> > <map:serialize/>
> > </map:match>
> >
> > and this
> > <map:match pattern="readXML">
> > <map:read src="http://server/genXML" mime-type="text/xml"/>
> > </map:match>
> >
> > <map:match pattern="test2">
> > <map:generate src="readXML"/>
> > <map:transform src="stylesheets/transform.xsl"/>
> > <map:serialize/>
> > </map:match>
> >
> > as stated it all work fine but is not cached as far as i can tell.
> > Is there a way for me to monitor the cache. but im quite sure it is not
> > cached as it is still very slow.
> >
> > I have striped my sitemap.xmap to the minimum and is deploying the
> > application with all the libs from cocon. so im not as such using
> > cocoon.war
> >
> > I guess my problem is that i need something more in either sitemap og
> > xconf
> >
> > sitemap:
> >
> > <map:components>
> >
> > <map:generators default="file">
> > <map:generator name="file"
> > src="org.apache.cocoon.generation.FileGenerator"
> > pool-max="32" pool-min="16" pool-grow="4"/>
> > </map:generators>
> >
> > <map:transformers default="xslt">
> > <map:transformer name="xslt"
> > src="org.apache.cocoon.transformation.TraxTransformer"
> > pool-max="32" pool-min="16" pool-grow="4">
> > <use-store>true</use-store>
> > <use-request-parameters>false</use-request-parameters>
> > <use-browser-capabilities-db>false</use-browser-capabilities-db>
> > </map:transformer>
> > </map:transformers>
> >
> > <map:readers default="resource">
> > <map:reader name="resource"
> > src="org.apache.cocoon.reading.ResourceReader"/>
> > </map:readers>
> >
> > <map:serializers default="html">
> > <map:serializer name="html"
> > mime-type="text/html"
> > src="org.apache.cocoon.serialization.HTMLSerializer"/>
> > </map:serializer>
> > </map:serializers>
> >
> > and the pipline with the above lines.
> >
> >
> > in cocoon.xconf i have:
> >
> > <stream-pipeline
> > class="org.apache.cocoon.components.pipeline.CachingStreamPipeline"
> > pool-max="32" pool-min="16" pool-grow="4"/>
> >
> > <stream-cache
> > class="org.apache.cocoon.components.store.MRUMemoryStore">
> > <parameter name="freememory" value="1000000"/>
> > <parameter name="heapsize" value="60000000"/>
> > <parameter name="cleanupthreadinterval" value="10"/>
> > <parameter name="maxobjects" value="100"/>
> > <parameter name="usecleanupthread" value="true"/>
> > <parameter name="threadpriority" value="5"/>
> > <parameter name="filesystem" value="true"/>
> > </stream-cache>
> >
> >
> > <event-pipeline
> > class="org.apache.cocoon.components.pipeline.CachingEventPipeline"
> > pool-max="32" pool-min="16" pool-grow="4"/>
> >
> > <event-cache
> > class="org.apache.cocoon.components.store.MRUMemoryStore">
> > <parameter name="freememory" value="1000000"/>
> > <parameter name="heapsize" value="60000000"/>
> > <parameter name="cleanupthreadinterval" value="10"/>
> > <parameter name="maxobjects" value="100"/>
> > <parameter name="usecleanupthread" value="true"/>
> > <parameter name="threadpriority" value="5"/>
> > <parameter name="filesystem" value="true"/>
> > </event-cache>
> >
> > I have read the docs on caching, an i think what i do is right, but i
> > dont quite understand the xmlserilization part, but i have tried to
> > include
> > <xml-serializer
> > class="org.apache.cocoon.components.sax.XMLByteStreamCompiler"/>
> >
> > <xml-deserializer
> > class="org.apache.cocoon.components.sax.XMLByteStreamInterpreter"/>
> >
> > but to no avail.
> >
> > The bedst would be if it was cached at the html setilization step, but
> > at xml generation step would be ok. I have also tried to generate the
> > xml with generate / xml seriliaze instead of read.
> >
> > Thanks alot for any inputs. Thanks.
> > I really hope to solve this, as the system cant go live till i have
> > solved the performance problem.
> >
> > thanks again
> > Jesper
> >
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> > For additional commands, e-mail: <[EMAIL PROTECTED]>
> >
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>