cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: ServletSource outside of pipeline
Date Tue, 05 Aug 2008 12:47:05 GMT
Robin Wyles pisze:
> Yikes... looks like it's back to httpclient to achieve my goals in this 
> area for the time being :(

Is it possible that you create artificial Servlet for your background job?

Then you could call this servlet (which is a Spring bean) and inside service() method of your

servlet you can be sure that you have a right context properly set up so SSF will work correctly.

You probably could call it with null values for both request and response.

I'm wondering if this couldn't be transformed into general solution if one needs to call pipeline

from outside of any context (outside of any servlet).

> Seems a shame though when in this case all I'm doing is posting the 
> results of one pipeline to another within my app...

The whole idea behind SSF is that it manages /servlets/ and cares about only them. The idea
connection is that, you connect two /servlets/ so one can pull data from another one.

Your use-case, even if valid, breaks contracts of SSF because you are trying to connect to
from nowhere (at least from SSF's point of view). If you establish artificial servlet, and
you call 
its service() method then SSF will handle this the same way as it would be request coming
browser. This will force it to properly initialize the CallStack and the whole infrastructure.

Does it makes sense to you?

Reinhard, what's your opinion?

Grzegorz Kossakowski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message