You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2004/09/30 00:16:03 UTC

Sitemap Reloading & Flow: Crashes

Hi all,

Seems like I found the reason why "touch sitemap" crashes all current flows. 
Sitemap reloading causes current sitemap to be released, together with flow 
Interpreter instance, and new sitemap looks up new instance of flow Interpreter. 
Because Interpreters are SingleThreaded, new instance is created. And after this 
change [1], each new instance has unique ID which causes scopes of all currently 
running flows to get lost:

   +    // The instance counters, used to produce unique IDs
   +    private static int instanceCounter = 0;
   +
   +    // The instance ID of this interpreter, used to identify user scopes
   +    private String instanceID;

Previously scopes where associated with sitemap path (which should be really 
sitemap path plus file name). Any insight on how to restore lost functionality? 
Any way to find out full sitemap URI?

Vadim

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-cvs&m=108917975901961


RE: Sitemap Reloading & Flow: Crashes

Posted by Carsten Ziegeler <cz...@apache.org>.
Starting with 2.2 you could use the getSitemapPath() method of
the Request object (you can get the request object using
the ContextHelper).

Carsten 

> -----Original Message-----
> From: Vadim Gritsenko [mailto:vadim@reverycodes.com] 
> Sent: Thursday, September 30, 2004 12:16 AM
> To: Cocoon Developers
> Subject: Sitemap Reloading & Flow: Crashes
> 
> Hi all,
> 
> Seems like I found the reason why "touch sitemap" crashes all 
> current flows. 
> Sitemap reloading causes current sitemap to be released, 
> together with flow Interpreter instance, and new sitemap 
> looks up new instance of flow Interpreter. 
> Because Interpreters are SingleThreaded, new instance is 
> created. And after this change [1], each new instance has 
> unique ID which causes scopes of all currently running flows 
> to get lost:
> 
>    +    // The instance counters, used to produce unique IDs
>    +    private static int instanceCounter = 0;
>    +
>    +    // The instance ID of this interpreter, used to 
> identify user scopes
>    +    private String instanceID;
> 
> Previously scopes where associated with sitemap path (which 
> should be really sitemap path plus file name). Any insight on 
> how to restore lost functionality? 
> Any way to find out full sitemap URI?
> 
> Vadim
> 
> [1] http://marc.theaimsgroup.com/?l=xml-cocoon-cvs&m=108917975901961
> 
>