14.5.2. Portlet configuration

In order to activate portlet session replication you need to:
  • Add a Portal-specific listener class to the /WEB-INF/web.xml file of your portlet web application
  • Configure your portlet to be distributed in the /WEB-INF/jboss-portlet.xml file
<web-app>
   ...
   <listener>
      <listener-class> org.jboss.portal.portlet.session.SessionListener </listener-class>
   </listener>
   ...
</web-app>
Example web.xml
<portlet-app>
   ...
   <portlet>
      <portlet-name>YourPortlet</portlet-name>
      ...
      <session-config>
         <distributed>true</distributed>
      </session-config>
      ...
   </portlet>
   ...
</portlet-app>
Configure YourPortlet to be replicated in jboss-portlet.xml