You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2005/01/25 23:51:34 UTC

Lazy mode and compiling classloader (was Re: FOM & input modules)

Reinhard Poetz wrote:

> Daniel Fagerstrom wrote:
>
>> Reinhard Poetz wrote:
>

>>> After some experiments with the new compiling classloader stuff, I 
>>> personally don't feel a need for a scripting action solution. But 
>>> this highly depends on your skills.
>>
>>
>>
>> Interesting, do you mean that you write ordinary actions and use the 
>> compiling classloader on them?
>
>
> I tried it and it worked for me. Currently, *you* have to make sure 
> that the sitemap reloads (e.g. adding a space character) but if I 
> understood Sylvain's mail to his "lazy mode" implementation correctly, 
> this will help to get rid of this (ugly) workaround.


Ahem, no: the lazy mode only loads (and therefore compiles) components 
the first time they are looked up in the service manager. That means 
that currently you have to "touch" the sitemap in order for classes to 
be reloaded.

But the actual purpose of the lazy mode is not only fast startup time, 
but also fast *reload* time: the idea is that when a source file is 
changed, Cocoon is restarted in the same way as a ?cocoon-reload=true, 
therefore recompiling everything that needs to be recompiled and 
garbaging all instances of the previous versions of recompiled classes.

But that reloading isn't there yet.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Re: Lazy mode and compiling classloader (was Re: FOM & input modules)

Posted by Sylvain Wallez <sy...@apache.org>.
Reinhard Poetz wrote:

> Thank you, that's much clearer than my explanation (though I meant the 
> same ;-)


LOL!

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


Re: Lazy mode and compiling classloader (was Re: FOM & input modules)

Posted by Reinhard Poetz <re...@apache.org>.
Sylvain Wallez wrote:
> Reinhard Poetz wrote:
> 
>> Daniel Fagerstrom wrote:
>>
>>> Reinhard Poetz wrote:
>>
>>
> 
>>>> After some experiments with the new compiling classloader stuff, I 
>>>> personally don't feel a need for a scripting action solution. But 
>>>> this highly depends on your skills.
>>>
>>>
>>>
>>>
>>> Interesting, do you mean that you write ordinary actions and use the 
>>> compiling classloader on them?
>>
>>
>>
>> I tried it and it worked for me. Currently, *you* have to make sure 
>> that the sitemap reloads (e.g. adding a space character) but if I 
>> understood Sylvain's mail to his "lazy mode" implementation correctly, 
>> this will help to get rid of this (ugly) workaround.
> 
> 
> 
> Ahem, no: the lazy mode only loads (and therefore compiles) components 
> the first time they are looked up in the service manager. That means 
> that currently you have to "touch" the sitemap in order for classes to 
> be reloaded.
> 
> But the actual purpose of the lazy mode is not only fast startup time, 
> but also fast *reload* time: the idea is that when a source file is 
> changed, Cocoon is restarted in the same way as a ?cocoon-reload=true, 
> therefore recompiling everything that needs to be recompiled and 
> garbaging all instances of the previous versions of recompiled classes.
> 
> But that reloading isn't there yet.

Thank you, that's much clearer than my explanation (though I meant the same ;-)
-- 
Reinhard