cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: The future of the cron block
Date Mon, 27 Aug 2007 14:53:31 GMT
Leszek Gawron pisze:
> Carsten Ziegeler wrote:
>> I'm wondering what the opinion about the future of our cron block is? Do
>> we need such a thing at all? Could we just use the quartz support of
>> Spring?
>>
>> If we keep it, should we refactor it?
>>
>> Now, I'm asking this because currently I need a scheduling service in a
>> non Cocoon environment (OSGi based). I thought of just using our cron
>> block but soon found out that there is no separation between api and
>> impl, a lot of Cocoon specific stuff mixed in, dependencies to Avalon
>> directly in the API etc.
>> My feeling is that if we think about keeping this block, we should clean
>> it up and solve these issues.
>>
>> WDYT?
> I have stopped using cron block as soon as Spring guys introduced their
> own integration. It would be enough to create a helper class that allows
> to call a pipeline easily in Spring pure environment and deprecate the
> rest. Oh wait, there is such class: PipelineUtil...

This will probably not work, PipelineUtil can only work inside existing request because it
relies on
 environmental data that must be set up externally, see getObjectModel() method in PipelineUtil:

    /**
     * Helper method to get the current object model.
     */
    protected static Map getObjectModel() {
        final WebApplicationContext webAppContext =
WebAppContextUtils.getCurrentWebApplicationContext();
        final ProcessInfoProvider infoProvider =
            (ProcessInfoProvider)webAppContext.getBean(ProcessInfoProvider.ROLE);
        return infoProvider.getObjectModel();
    }

To be sure that everything is set up, I guess that everything must go through DispatcherServlet.

-- 
Grzegorz Kossakowski
http://reflectingonthevicissitudes.wordpress.com/
*** My Internet Service Provider breaks my internet connection                ***
*** incessantly so I'll not be able to respond to e-mails                     ***
*** regularly and my work will be somehow irregular.                          ***
*** I'm already trying to switch ISP but it will take handful amount of time. ***

Mime
View raw message