cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Howto: call an internal pipeline from a component
Date Thu, 14 Feb 2002 15:23:15 GMT
> From: Michael Gerzabek [mailto:michael.gerzabek@at.efp.cc]
> 
> >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.

Sorry, don't get what's your issue here. May be some example would help.

Vadim

> 
> 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
> >> java.net.MalformedURLException: unknown protocol: cocoon
> >> 	at java.net.URL.<init>(URL.java:480)
> >> 	at java.net.URL.<init>(URL.java:376)
> >> 	at java.net.URL.<init>(URL.java:330)
> >> 	at
> >> org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryI
> >> mpl.java:6
> >> 6)
> >>
> >> Is there a way to do so?
> >>
> >> - Michael
> >>


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


Mime
View raw message