Some corrections below.

Subbu

On 8/9/07, Alexandre-Michael Neubert <[EMAIL PROTECTED]>
wrote:
>
> Elliot, Diego,
> Thanks for the answers and the pointer. Indeed, the WSRP Primer answered a
> lot of my questions and made my understanding much better through the
> scenarios.
>
> Since I instantiated this discussion, I will try to answer my questions.
> Feel free to answer if I'm wrong.
>
> My questions were:
> * What is the difference between a POP and a CCP?
>         As Elliot sayed, POPs are portlet instances (with associated
> portlet
> handles) as they are exposed by the producer. A POP can be manipulated  as
> it is by a user as long as no performBlockingInteraction (PBI) is
> required. As soon as a PBI is required (typically on a form
> submission)
> the consumer sends a flag portletStateChange set to     cloneBeforeWrite
> to
> the producer in order to create a user- personalized cloned instance of
> the
> portlet. This clone is a CCP.
>         From then on, each time the user interacts with this portlet, the
> portlet handle that will be send by the consumer to identify the
> portlet instance will be the cloned portlet handle and on every PBI
> on  that
> clone the flag portletStateChange will be set to readWrite.



This is not quite the case. Both a POP and a CCP can equally handle pbia.
The only difference is the ability to make persistent state changes managed
by the producer or the consumer. For instance,  thinking in terms of JSR168,
let's say, a portlet wants to store preferences during processAction. Such
an action might trigger the  container (producer) or the portal (consumer)
to trigger a clone of the portlet, since the portlet may be currently
shared, and you want to create a user's copy of the portlet's state. With a
POP, persistent changes are not allowed - it is like a master copy. With a
CCP, persistent changes may be allowed. The portletStateChange flag allows
the transition of a portlet from being a POP to a CCP.

* Is there a way to set explicitely the portletStateChange attribute in a
> configuration file?
>         As far as I know, a portletStateChange cannot be forced by the
> user
> by      configuration. The consumer may require a portletStateChange but
> for
> this to happen, two conditions must be fulfilled:
>                 * The consumer has to verify that a portlet state change
> can
> be              performed (e.g the user has enough rights)
>                 * The producer must accept this change
>
> * Does this automatically mean that the portlet has to be cloned if
> several
> users access it at the same time?
>         Yes. A portlet instance will be cloned for every user as soon as
> he
> performs a PBI.
>
> * How are exactly portlet preferences related to cloning?
>         Performing a PBI action means that the producer and/or the portlet
> is      about to change it's persistent state (i.e portlet preferences).
>         These preferences can be read and written by the consumer during a
> getMarkup operation. Portlet preferences are manipulated for example    to
> store parameters that will serve the markup generation of a     portlet.
>
> And some more questions related to the WSRP4J implementation:
>
> * Each time a portlet is cloned, it's handler is recorded in the
> persistence
> directory and associated to the registration handle and also in the
> portlet
> directory, where it gives information about the parent handle (i.e the
> portlet it is cloned of). But how comes that it has also to be written to
> the portletentityregistery.xml file which keeps growing on and on?
> Is there a way to configure the WSRP4J producer to stop writing to that
> file
> or clean it periodically?
>
> * As I understood, a cloned portlet instance is associated to a consumer
> (by
> its registration handle) and to a particular user. So a user can access
> his
> cloned portlet instance as much as he wishes, the log out and relog and
> the
> same instance will always be active for that user.
> So, does that mean that if I have 1000 potential users and 10 accessible
> portlets that require PerformBlockingInteraction statements, I will have
> permanently 10000 portlet instances?
> Is there a way to tell the WSRP4J producer to timeout such cloned
> instances
> without having to invoke explicitly the destroyPortlets method by the
> consumer?
>
> Thanks a lot,
>
> Alex
>
>
>
>
>


-- 
------------------------------
http://www.subbu.org

Reply via email to