Show Table of Contents
15.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
HASessionStateservice is bound. The default value is/HAPartition/Default. - BeanCleaningDelay is an optional attribute to specify the number of miliseconds after which the
HASessionStateservice 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 theHASessionStateservice needs to do this cleanup sometimes. The default value is30*60*1000milliseconds (i.e., 30 minutes).

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.