Hi Scott
Makes sense! One question remains though: obviously the
GlobalConfigurator makes sure that general Configurator's
beginRequest()/endRequest() are only called once per physical
request. How do you detect the end of a physical request in
a portal environment? According to the spec the portlet-bridge
might - after an initial action request - send one or more
render requests. How does the GlobalConfigurator knows when
the last render request has been processed?
Thanks for your explanations.
- Felix
Scott O'Bryan wrote:
Felix,
The global configurator is not a typical configurator. In a normal
Portlet 1.0 environment, there is no guarentee that request scope is
preserved between action and render. So yes, the GlobalConfigurator
gets called for each request (action and then render). Under the
covers, it makes sure that YOUR configurators, the ones implementing the
configurator interface, are run once per physical request.
The new configurator framework (which was delayed because of some
additional usecases) that will be added to the commons project have the
concept of "Detailed Execution" vs. "Normal Execution". Configurators
which require "Detailed Execution" are run once per "virtual" request.
For now, however, the Trinidad Configurators (with the exception of the
GlobalConfigurator) are all "Normal Execution". BTW- I think it you
look at the javadoc for the global configurator, it says it violates the
normal configurator contract. The global configurator is the base
*framework* piece and is in the impl package. It's designed to be
transparent to the other configurators and it's sole job is to make sure
the contract to the normal configurators is followed.
Another example of how this violates the contract is that if you call
GlobalConfiguratorImpl.beginRequest before you do a
GlobalConfiguratorImpl.init, the thing just initializes the Configurator
framework for you. By contract, your configurators are guarenteed to
have their init's called first, but the GlobalConfiguratorImpl kinda
holds you hand a bit.
Make sense?
Scott
Felix Roethenbacher wrote:
Hi
I currently have issues with Trinidad running in a portal environment
(Pluto RI). The documentation for Configurator states that
beginRequest() / endRequest() should be called exactly once for every
physical request. Whereas the javadoc for beginRequest() in
GlobalConfiguratorImpl states that beginRequest() should be called
for the action request AND render request if running in a portal
environment. This seems conflicting to me.
Can anyone explain the idea behind the Configurators a wee bit more?
I'm trying to get Trinidad running in a portal enviroment but it's
not at the moment for various reasons. I guess there is no test
environment to test for portal compatibility?
Any help is appreciated.
- Felix