You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Ethan Adams <et...@gmail.com> on 2006/04/06 14:45:31 UTC

Is ServletPortletInvoker Thread safe?

I've been having a problem where the portlet A (that belongs to fragment 1)
is trying to rending in fragment 2 .

While investigating this issue, I noticed that ServletPortletInvoker is used
for every portlet "invoke."

Can this be thread safe since it has member variables that are set through
activate()  and used during invoke()?  Or am I missing something?

Thanks,

Ethan

Re: Is ServletPortletInvoker Thread safe?

Posted by Ethan Adams <et...@gmail.com>.
Looked into this further and it looks like ServletPortletInvoker is setup to
instantiated each time

  <bean id="ServletPortletInvoker"
        class="org.apache.jetspeed.container.invoker.ServletPortletInvoker"
singleton="false"
  />

but it only gets instantiated once because it is used by a singleton and
passed in the constructor

   <bean id="org.apache.pluto.invoker.PortletInvoker"
        class="
org.apache.jetspeed.container.invoker.PortletInvokerFactoryImpl"
  >
    <constructor-arg index="0">
        <ref bean="ServletConfig" />
    </constructor-arg>
    <constructor-arg index="1">
        <ref bean="PortalContext" />
    </constructor-arg>
    <constructor-arg index="2">
        <ref bean="portletFactory" />
    </constructor-arg>
    <constructor-arg index="3">
        <ref bean="ServletPortletInvoker"/>
    </constructor-arg>
    <constructor-arg index="4">
        <ref bean="LocalPortletInvoker"/>
    </constructor-arg>
  </bean>



On 4/6/06, Ethan Adams <et...@gmail.com> wrote:
>
> I've been having a problem where the portlet A (that belongs to fragment
> 1) is trying to rending in fragment 2 .
>
> While investigating this issue, I noticed that ServletPortletInvoker is
> used for every portlet "invoke."
>
> Can this be thread safe since it has member variables that are set through
> activate()  and used during invoke()?  Or am I missing something?
>
> Thanks,
>
> Ethan
>