You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bart Dijkstra <bd...@yahoo.com.au> on 2004/08/31 15:05:53 UTC

File locked with jar: protocol

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!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

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