On Tuesday 11 October 2005 20:04, Michael Wechner wrote:
> Michael Ralston wrote:
> >I fixed the problem.
> >
> >javax.xml.DocumentParser wasn't closing the inputstream, so I called
> >DocumentParser with my own input stream and then closed it myself. See
> > patch.
>
> well, I am not sure, but it might be better to fix the DocumentBuilder.

Yeah, javax.xml.parsers.DocumentBuilder is where the problem really lies. It 
is what is failing to close the input stream. I figured it was easier to make 
lenya use that class in a different way than fixing that class. I'm sure 
there is probably an update to that class somewhere, but this way works 
too :)

> another question re your patch: Why did you change the sequence re
> deleting from SiteStructure and  DocumentSource?
>

If deleting the file fails, and the sitetree has already been modified, then 
the sitetree is left in an inconsistent state. The sitetree doesn't have the 
page-node in it, but the file is still in the live directory. This causes a 
classcast exception if you attempt to deactivate the page again after it 
failed to deactivate ths first time.

With it switched around the sitetree is modified only after deletion succeeds.

Michael Ralston

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to