You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Robin Green <gr...@hotmail.com> on 2000/07/11 13:47:01 UTC

Re: Reloading jars

"Torsten Curdt" <tc...@dff.st> wrote:
>I'm using some self-written classes from a jar
>which is in in cocoons path.
>When I change the files in the jar it seems
>I need to do a full restart of cocoon / the
>the servlet runner.
>
>Is there a way to tell them to reload the new classes?
>(Sounds problematic to me...)

This is a common requirement. I have a patch here which I have been meaning 
to release for a couple of weeks now, to fix the reload problem. Just need 
to generate it and email it out. Hopefully this can go into Cocoon 1.8! :-)

There will be an extra option in cocoon.properties to configure what 
directories to reload from, so it can be turned off if required.

However it does not reload from jars or zips because that is too dangerous 
as far as I can see - unfortunately some Java virtual machines have native 
code which does not expect zip or jar files to be modified concurrently, and 
it can literally cause a VM crash.

It won't be a problem to unzip your jar files and just use the class files 
in the normal way, will it?


--
Robin Green
i-tao Ltd.
4 Skyline Village
Limeharbour
London E14 9TS
United Kingdom
Phone +44 20 7537 2233  Fax +44 70 8081 5118
http://www.i-tao.com


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


RE: Reloading jars

Posted by Torsten Curdt <tc...@dff.st>.
> >Is there a way to tell them to reload the new classes?
> >(Sounds problematic to me...)
> 
> This is a common requirement. I have a patch here which I have 
> been meaning 
> to release for a couple of weeks now, to fix the reload problem. 
> Just need 
> to generate it and email it out. Hopefully this can go into 
> Cocoon 1.8! :-)

Vote for that!!

> There will be an extra option in cocoon.properties to configure what 
> directories to reload from, so it can be turned off if required.

Cool!

> However it does not reload from jars or zips because that is too 
> dangerous 
> as far as I can see - unfortunately some Java virtual machines 
> have native 
> code which does not expect zip or jar files to be modified 
> concurrently, and 
> it can literally cause a VM crash.

Hm... that's what meant with problematic ;-)


> It won't be a problem to unzip your jar files and just use the 
> class files in the normal way, will it?

Unfortunately it _is_ a problem!! ... I've tried it this way first!
I put the directory into jruns classpath but cocoon didn't find
the classes anyway. I had to name my jar in the path!
--
Torsten