cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique <opensource...@gmail.com>
Subject background Action - temporary lock xml file for cocoon requests
Date Fri, 03 Feb 2006 19:48:07 GMT
Hi all,

I have a Cocoon Action that takes a lot of time and
adds new entries to an XML document (Lenya's sitetree.xml).
I have put this action inside a different Thread so the user can
continue browsing without having to wait to long:

act(..) {

       Thread approveThread = new Thread(this);
       approveThread.start();
return null;
}

However, when a user requests some pages during this background
processing, the sitetree.xml is loaded and is sometimes in an inconsistent
 state (see end).
I guess this is when the save() operation is writing its output and a
user requests the page.

Is there some way of preventing Cocoon to process the sitetree.xml while
it is being written to ?
Or any other suggestions for performing a task in the background ?

thx,

Dominique De Munck



"
org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.apache.cocoon.ProcessingException: Error executing pipeline.:
org.xml.sax.SAXParseException: XML document structures must start and
end within the same entity.

column: 4

line: 858

cause: org.xml.sax.SAXParseException: XML document structures must
start and end within the same entity.

location: file:/home/devel/web_software/web_software/tomcat-5.0.28/webapps/lenya/lenya/pubs/ParlementaireActiviteiten/content/authoring/sitetree.xml
"

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


Mime
View raw message