Fórumok

Session Replication in Cluster Environment

thumbnail
Subhasis Roy, módosítva 8 év-val korábban

Session Replication in Cluster Environment

Expert Bejegyzések: 275 Csatlakozás dátuma: 2012.01.20. Legújabb bejegyzések
Hi,

I have used PortletSession in APPLICATION_SCOPE in liferay, but its not working in cluster environment.

Error in Cluster Environment:
Caused by: java.lang.IllegalArgumentException: JBAS018062: 'employeeBean' attribute with type 'com.test.portlet.command.data.EmployeeBean' cannot be replicated
at org.jboss.as.web.session.ClusteredSession.setAttribute(ClusteredSession.java:824)
at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:130)
at com.liferay.portlet.PortletSessionImpl.setAttribute(PortletSessionImpl.java:200)


"employeeBean" is a POJO object stored in the session and used in all the portlets. As per my understanding this issue is caused because Session is not replicated properly in all the nodes in the cluster.
Please correct my understanding, if wrong.

Is there any draw backs if we configure session replication in cluster environment for Life ray portal.

Thanks,
subhasis
thumbnail
Anil Sunkari, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Expert Bejegyzések: 427 Csatlakozás dátuma: 2009.08.12. Legújabb bejegyzések
Hi Subhasis,

Since its a clustered environment.Please make sure "Sticky Session" enabled in that environment.

Regards,
Anil Sunkari
thumbnail
Andew Jardine, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
The whole point of using Session Replication is that the session does not necessarily have to stick to one node in the cluster.
thumbnail
Juan Gonzalez, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Liferay Legend Bejegyzések: 3089 Csatlakozás dátuma: 2008.10.28. Legújabb bejegyzések
Hi Subhasis,

all session objects should implement Serializable, please check that.
thumbnail
Subhasis Roy, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Expert Bejegyzések: 275 Csatlakozás dátuma: 2012.01.20. Legújabb bejegyzések
Hi Juan,

All the all the bean objects are serializable and also added <distributable/> tag in the web.xml

but still its giving same issue.
thumbnail
Juan Gonzalez, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Liferay Legend Bejegyzések: 3089 Csatlakozás dátuma: 2008.10.28. Legújabb bejegyzések
Check if all attributes of that POJO are implementing Serializable too, all the clues points to that direction.
thumbnail
Subhasis Roy, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Expert Bejegyzések: 275 Csatlakozás dátuma: 2012.01.20. Legújabb bejegyzések
Hi Juan,

It worked. Thanks a lot.

Making the POJO class Serializable and adding the <distributable/> tag in web.xml file worked.

I had cleared the tmp folder of the JBOSS and made a fresh deployment. It's working fine.
thumbnail
Juan Gonzalez, módosítva 8 év-val korábban

RE: Session Replication in Cluster Environment

Liferay Legend Bejegyzések: 3089 Csatlakozás dátuma: 2008.10.28. Legújabb bejegyzések
Subhasis Roy:
Hi Juan,

It worked. Thanks a lot.

Making the POJO class Serializable and adding the <distributable/> tag in web.xml file worked.

I had cleared the tmp folder of the JBOSS and made a fresh deployment. It's working fine.


Glad it worked, Thanks.