JBoss.org Community Documentation

18.2.3. The HASessionState service configuration

The HASessionState service MBean is defined in the all/deploy/cluster-service.xml file.

 
<mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService"
   name="jboss:service=HASessionState">
    
    <depends>jboss:service=Naming</depends> 
   <!-- We now inject the partition into the HAJNDI service instead 
 of requiring that the partition name be passed --> 
 <depends optional-attribute-name="ClusterPartition" 
  proxy-type="attribute">
  jboss:service=${jboss.partition.name:DefaultPartition}
  </depends>
  <!-- JNDI name under which the service is bound -->
  <attribute name="JndiName">/HASessionState/Default</attribute>
  <!-- Max delay before cleaning unreclaimed state.
Defaults to 30*60*1000 => 30 minutes -->
<attribute name="BeanCleaningDelay">0</attribute>
</mbean>   

The configuration attributes in the HASessionState MBean are listed below.

  • ClusterPartition is a required attribute to inject the HAPartition service that HA-JNDI uses for intra-cluster communication.

  • JndiName is an optional attribute to specify the JNDI name under which this HASessionState service is bound. The default value is /HAPartition/Default.

  • BeanCleaningDelay is an optional attribute to specify the number of miliseconds after which the HASessionState service can clean a state that has not been modified. If a node, owning a bean, crashes, its brother node will take ownership of this bean. Nevertheless, the container cache of the brother node will not know about it (because it has never seen it before) and will never delete according to the cleaning settings of the bean. That is why the HASessionState service needs to do this cleanup sometimes. The default value is 30*60*1000 milliseconds (i.e., 30 minutes).