Jerry Rubin
Jerry Rubin

Reputation: 87

Session bean being reinstantiated in same session (in 2 Liferay portlets)

I have 2 JSF portlets (one ICEfaces, one straight JSF) in a single Liferay project (single war) in LR 6.1 GA1. My session bean is annotated with @ManagedBean and @SessionScoped and my faces-config.xml contains

    <managed-bean>
    <managed-bean-name>wtfBean</managed-bean-name>
    <managed-bean-class>com.test.beans.WtfBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

I've placed each of the portlets on a separate web page. I print to System.out in my bean's constructor (and I've traced the whole process), and my bean is being instantiated twice.

Is there something else I should be doing to share my session data?

Thanks.

Upvotes: 1

Views: 498

Answers (1)

besc
besc

Reputation: 491

Your configuration is fine. It's caused by portlet bridge.

Upvotes: 1

Related Questions