cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: application-context loading order
Date Sun, 16 Mar 2008 23:16:58 GMT
Patrick Heiden pisze:
>> You may now wonder what about sitemap-specific child containers. I don't want to
go into
>> details because I consider this functionality as legacy and not worth long explanations.
>> However, if you really want to know the details I could share my knowledge.
> I really enjoy your comprehensive answers and if I am right by guessing that these
> sitemap-specific containers are in 'avalon-scope' then I am not going to use them. If
I am wrong,
> I'll be back, relying on your knowledge ;)

As Carsten pointed out, you can put Spring bean declarations into this child containers but
this is 
a really bad idea because this technique is completely not block-aware. Once you start using
tricks you can be sure that you will run into troubles when we finally implement true isolation.

That's why I'm so reluctant to speak about these child containers.

>> For now I would say that, if you want to stay on the safe side and always get correct
>> context just use org.apache.cocoon.spring.configurator.WebAppContextUtils instead
of Spring's
>> standard class.
> Could you please be a bit more specific? I`m not sure what you are trying to tell me.
Do you just
> mean, that I should use that if I want to get ROOT_WEB_APP_CTX? Or am I able to get specific
> child-contexts out of that (e.g. with RequestAttributes ?) ? >>a bit confused<<
Besides: As long
> as the cocoon.getComponent("FOOBAR")-method will work and true isolation of contexts
is not
> supported, I see no case for asking cocoon to spit out specific contexts.

I meant: if you want to achieve always the same result as by using cocoon.getComponent() and
need an access to WebApplicationContext directly then go with our own version of WebAppContextUtils

that is aware of context switching. Anyway, using cocoon.getComponent() is always a safe option.

> My concerns only go
> towards the order of context-loading. And this point is still confusing due to Joergs
> within this thread. He said, that appctx-loading-order is aplphabetical - how could this
be, if
> my RCL-output after mvn jetty:run shows up with an alphabetic unordered list???

Not sure about this detail (can check if needed) but mind you asking why you bother? Spring
following way: first it reads all configurations files and only then it tries to resolve all
dependencies, etc. Given that, the read order doesn't matter because you always get the same
Or am I wrong here?

> I will work through this as soon as possible and will give feedback. Thank your very

You welcome. :)


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

View raw message