cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: call CLI from webapp
Date Fri, 16 Jan 2004 11:21:34 GMT
Patrick Hess wrote:

> Upayavira wrote:
>
>>> Another question: I'm using the CocoonBean inside of an Action -- is 
>>> there any reason why I should NOT do this????
>>
>>
>>
>> Probably.
>>
>> I have conteplated this sort of thing before, but the issues are 
>> quite large. The CocoonBean creates a whole new instance of the 
>> Avalon framework in order to do its work. So, if you use it within a 
>> running Cocoon, you've got a Cocoon within a cocoon, which will not 
>> be very efficient at all. To do it properly, you'd probably need to 
>> share the Cocoon instance with the servlet, but that's going deeper 
>> than I ever have into Cocoon.
>>
>> Try it. See if it works. But don't expect it to be very efficient, 
>> and expect it to put a significant load onto your server while it is 
>> running, if it works at all.
>>
>> Were I to do this, I'd create an action or something that writes a 
>> trigger that is picked up by a cron job that carries out the task 
>> asynchronously.
>
>
> From my current tests it seems to be more efficient to start the 
> second instance (with all drawbacks) than having an independend 
> instance triggered. The same task inside the webapp starts up much 
> faster. Having a shared instance sounds really nice but I will not no 
> look into this until I get a better contact to cocoon sources. In the 
> meantime I will continue to research what's possible inside a webapp 
> -- any hints are welcome ;)

Great.I look forward to hearing how you get on. I'd suggest in future 
you post on the dev list. For some reason it feels it would be relevant 
there.

Regards, Upayavira



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


Mime
View raw message