cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Dijkstra <bdijk...@yahoo.com.au>
Subject File locked with jar: protocol
Date Tue, 31 Aug 2004 14:27:10 GMT
Hi all,

I'm using the jar: protocol to extract an XML document
from a zipfile as follows:

<map:match pattern="myTest">
  <map:generate type="file" 
src="jar:file:///tmp/zipfile.zip!/current.xml"/>
  <map:serialize type="xml"/>
</map:match>

As you can see, all very normal using the standard
FileGenerator.

After running this pipeline though, the zipfile is
locked  by the cocoon (java) process. Only after
stopping the webserver, the file is released and may
be changed/deleted. 

I have tested this in several
environments/configurations combination and the
problem occurs on all of them:

- Cocoon 2.1.4 and 2.1.5
- Running on Tomcat 5.0 and Jetty 4.2.19
- Running on Solaris 8 and Windows XP

On Solaris I even ran out of File Descriptors at some
point.

I suspect the problem  might be caused by the
org.apache.excalibur.source.impl.URLSourceFactory
that, if I understand correctly, is responsible for
handling the jar: protocol. It seems the
release(Source) is not handled properly for jar:. I
guess one workaround is to write a JarGenerator to
handle all of the jar io/extraction but this sort of
defeats the whole purpose of having the jar: protocol
and component management.

Has anyone had any similar experiences or maybe ideas?

Thanks much,
Bart 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

Mime
View raw message