You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Csaba Nagy <cs...@12snap.com> on 2001/06/07 11:25:02 UTC

RE: [C2] Reloading changed sitemap

Hi Giacomo,

OK, I wasn't specific at all in my last mail... my cocoon.xconf
configuration file contains the line:

<sitemap file="sitemap.xmap" reload-method="synchron" check-reload="yes"/>

and still the sitemap is not reloaded.
I've done some debugging and it's a strange thing happening: in the
org.apache.cocoon.environment.Source class, the getInfos method has a call
to the file.lastModified() method, which is returning a negative value
(wrong !). It looks like a truncated value (long to int).
Consequently the getLastModified method will compare 2 negative values,
which will result in false, and that's why the sitemap is not reloaded.
I'm not sure where is the bug, in the implementation of the File class, or
where ? Is this happening on any other platform ? (I'm using the Java 1.3
JDK included with weblogic 6.0 sp1 on Windows 2000)
For development purposes I will just invert the comparisons' direction, and
it will work, but this is not the solution.
Any idea ?

Thanks,
Csaba.

-----Original Message-----
From: giacomo [mailto:giacomo@apache.org]
Sent: Wednesday, June 06, 2001 10:36 PM
To: 'cocoon-users@xml.apache.org'
Subject: Re: [C2] Reloading changed sitemap


On Wed, 6 Jun 2001, Csaba Nagy wrote:

> Hi cocooners,
>
> I'm running cocoon 2 in weblogic 6.0 on Windows 2000, and there's a big
> problem in that the sitemap is not reloaded if I change it.
> In my understanding it should be reloaded as soon as it changes.
> Am I missing something ?
> Is the sitemap reloading working on other platforms ?

If you are using the default setup you might notice that the first
request after you changed the sitemap doesn't reflect it. If you wait a
few seconds and retry you should see the changes. This is due to the
fact that the regeneration of the sitemap class is done in a background
thread.

Giacomo

>
> Thanks,
> Csaba.
>
> ---------------------------------------------------------------------
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
>


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>

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