You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Brett Randall <ja...@gmail.com> on 2005/02/15 05:13:30 UTC

Confirming PortletContainer.portletLoad() scope/contract

Hi,

I'm hoping to get some clarification on the contract of
PortletContainer.portletLoad().

In the docs at http://portals.apache.org/pluto/developer/integrate.html
, it is suggested that this method is "called for each request, but
only once for all portlets" (as opposed to "called for each request
and for each portlet").  The signature of the method however suggests
(to me) that it applies at the scope of a PortletWindow, and testing
shows that the RI portal is calling portletLoad() once per
PortletWindow.

The METHOD_NOOP dispatch is sent as a "dummy request" to apparently
force the servlet container to init() the wrapping servlet (also
causing it to instantiate it's wrapped servlet instance), and ensuring
that this occurs after the portal's own context has been initialised. 
OK, so the portal relies on PorletDefinition in-between portletLoad()
and render(), otherwise no need for the fake dispatch every time.

If this is the purpose, then portletLoad() would need to be called
per-portlet (== per servlet wrapper).  Is the RI portal not honouring
the PortletContainer contract, or do the above docs need tweaking?

Thanks for any offer to clarify/confirm.

Brett