Grzegorz Kossakowski wrote:
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 doubt that this will work because the parent request is passed to the current servlet-service request. Passing null for the request will lead to NPEs IMO.

But this shouldn't be too difficult to fix or could already work if a valid request object is being passed.

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).

yes, maybe we can provide some wrapper for that purpose.

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 of 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 servlet 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 from 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?

I also think that it is a valid use case and would be happy to see a general solution in the ssf-impl code.

--
Reinhard Pötz                           Managing Director, {Indoqa} GmbH
                         http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member                  [EMAIL PROTECTED]
________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to