Aurelien,

> Should my portlets inherit from AbstractPortletInstance now ? Is it better
> for performance / stability ?

Yes, your portlets should inherit from AbstractInstancePortlet. This will
make possible having two or more instances of the same portlet on the same
pane. I tried it, it works.

>
> Why is there still two kinds of AbstractPortlet ? I don't really get it...
> Is it only for backward compatibility ?
>

Right on. Shortly, I will review some of the existing portlets which still
extend from AbstractPortlet (JspPortlet, WebPagePortlet, IFramePortlet, etc)
and make them extend from AbstractInstancePortlet.

Best regards,

Mark C. Orciuch
Next Generation Solutions, Ltd.
e-Mail: [EMAIL PROTECTED]
web: http://www.ngsltd.com


> Aurelien.
>
> > -----Message d'origine-----
> > De : David Sean Taylor [mailto:david@;bluesunrise.com]
> > Envoyé : mercredi 16 octobre 2002 20:31
> > À : Jetspeed Users List
> > Objet : RE: Getting Crazy...
> >
> >
> > I Don't recommend turning off caching except during development.
> >
> > There is support to handle how your portlets are cached. Just override
> > AbstractPortlet's getHandle:
> >
> >     public static Object getHandle(Object config)
> >
> > or better yet, just have your portlet inherit from
> > AbstractInstancePortlet
> > instead of AbstractPortlet, which uses the instance id for
> > the cache handle:
> >
> >     /**
> >     * Construct the handle used for caching.
> >     * @param config The config object, expected to be a PortletConfig.
> >     */
> >     public static Object getHandle(Object config)
> >     {
> >         //this implementation expects a PortletConfig object as its
> >         // configuration
> >         PortletConfig pc = null;
> >
> >         if (!(config instanceof PortletConfig))
> >         {
> >             return null;
> >         }
> >
> >         // form the key from the current request's portal page profile
> >         // and the portlet id in the config
> >         pc = (PortletConfig)config;
> >
> >         StringBuffer handle = new StringBuffer(256);
> >         handle.append(pc.getPageId());
> >         handle.append('/');
> >         handle.append(pc.getPortletId());
> >
> >         return handle.toString();
> >
> >     }   // getHandle
> >
> > There are two settings for Parameters in the registry for
> > controlling cache
> > handles, but to my surprise they are not used in the code:
> >
> >      <field name="cachedOnName" type="boolean">
> >             <bind-xml name="cachedOnName" node="attribute"/>
> >      </field>
> >      <field name="cachedOnValue" type="boolean">
> >             <bind-xml name="cachedOnValue" node="attribute"/>
> >      </field>
>
>
> --
> To unsubscribe, e-mail:
<mailto:jetspeed-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:jetspeed-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:jetspeed-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-user-help@;jakarta.apache.org>

Reply via email to