cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 7868] - [PATCH] protected createCocoon() in CocoonServlet
Date Mon, 15 Apr 2002 08:54:51 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7868>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7868

[PATCH] protected createCocoon() in CocoonServlet





------- Additional Comments From crafterm@fztig938.bank.dresdner.net  2002-04-15 08:54 -------
Hi Berin,

Do you mean in a CocoonServlet subclass's init() ? Yes, that works for all types
of components except for those implementing ThreadSafe.

The problem is that CocoonServlet.createCocoon() invokes contextualize() on the
newly created Cocoon instance, passing in CocoonServlet.appContext, and in turn
Cocoon.initialize() which among other things prepares Cocoon's ECM for use.

When Cocoon.initialize() is called Cocoon's ECM creates an instance of each
ThreadSafe component, if a particular component is contextualizable it will be
given the Cocoon.appContext which is fine, but this is all before our
CocoonServlet subclass's init() is run - meaning the appContext won't have any
of our data in it.

This means, any custom components that implement Contextualizable and ThreadSafe
won't work correctly, because the required contextualizable data is set too late.

What we need to be able to do is add context values before
CocoonServlet.createCocoon() is called (ie. before Cocoon's ECM instanstiates
any ThreadSafe components), but after CocoonServlet.init() (so we can access
init-param's, etc).

Hope that makes sense and that I've analysed it correctly. Any thoughts ?

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


Mime
View raw message