Bruno Dumon wrote:
Hi,The Cocoon object is an Avalon component, but in fact doesn't need to be : it is conceptually a container, which loads the configuration, creates an ECM and delegates the implementation of the Processor interface to the component implementing this interface that is managed by the ECM (look at Cocoon.process()).
I'm thinking about making some Avalon component (managed by Cocoon's
ECM) which would start its own thread. From that thread, I would like it
to send requests to Cocoon (directly, not over HTTP). So I guess I would
need access to the Cocoon instance (a protected variable in the
CocoonServlet), and implement some appropriate environment classes.
The problem in the above scenario is that there is currently, AFAIK, no
possibility to get access to the Cocoon object. So I was thinking, since
the Cocoon class itself is already an Avalon component, it could be made
available via Composable (using a small parent component manager or an
extra check in the lookup method of the CocoonComponentManager).
So some quick yes/no questions:
- Am I correct that there is indeed no way in which a seperate thread
can send requests directly to cocoon? (I now there is the cocoon:
protocol, but I thought that only works inside the request-handling
thread, and I would need access to a SourceResolver for that)
- Does anyone see conceptual problems with making the Cocoon object (or
in fact the Processor interface) publicly available?
So what you are looking for may be simply looking up the Processor role in the ECM that manages your component, which will return the sitemap engine, and call process() on that object.
Hope this helps,
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]