cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gerzabek" <>
Subject WG: Howto: call an internal pipeline from a component
Date Thu, 14 Feb 2002 09:24:50 GMT
>You have to have resolver. Then:
>Source source = resolver.resolve("cocoon://i-post-XRFC/.....");

Ok. That's fine when you are in the normal request-chain. My problem is
that i've already resolved all dynamic components like session, parameters
and request and have a legal document against an erp system.

now to garantee that the erp-request is handled even if the erp is not
present i've to cache that document. some sceduler job tries again and
again to get the document into the erp.

that means it can be immediately after some user pushes a button in 
the web, but it could also be the next day.

i built up a pipeline that works fine with synchronous requests. as a
lazy programmer i thougt it would be nice to have all the facilities
offered by the sitemap (or a special pipeline) to get my document
to the erp and process the answer as well by some xsl stylesheets.

the first idea was to code the gethost(), getport(), getprotocol() into
the component (and it works also fine :), but it seems to me a too 
long way for my internal request. i think if i can setup an internal 
org.apache.cocoon.Environment i could do this more efficient.

is anybody out to tell me how to do this?

- Michael

>> Hello!
>> I need to call an internal pipeline from a component that's working
>> in the background.
>> try {
>>   String source = "cocoon://i-post-XRFC/" + 
>> conf.getAttribute("name") + "/"
>> + conf.getAttribute("type") + "/" + id;
>>   URLFactory urlFactory = (URLFactory)manager.lookup(URLFactory.ROLE);
>>   URL url = this.urlFactory.getURL(source);
>>   ...
>> and then I get
>> unknown protocol: cocoon
>> 	at<init>(
>> 	at<init>(
>> 	at<init>(
>> 	at
>> org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryI
>> 6)
>> Is there a way to do so?
>> - Michael

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

View raw message