Session Replication
To enable the seamless transition of web clients between clustered servers in the case that a node becomes unavailable, you will need to configure session replication. This needs to be set up either within your application server (if it supports this functionality), or using a third party tool such as Terracotta Web Sessions. This configuration is not specific to Rice, it will vary depending on the solution you choose, and it is beyond the scope of this documentation.
The Session Document Service
The SessionDocumentService, which was part of the default configuration for Rice before versions 2.1.4 for the 2.1 line and 2.2.2 for the 2.2 line, provided session failover in certain limited cases, but was disabled as part of KULRICE-9148. This service was problematic for performance when dealing with larger documents, and it is not recommended that it be re-enabled. It is possible to do so however.
To enable it again, a bean definition overriding the knsSessionDocumentService bean needs to be created and configured to load into the correct Spring context. Create a file such as the following which we'll name KNSOverrideSpringBeans.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="knsSessionDocumentService" class="org.kuali.rice.kns.service.impl.SessionDocumentServiceImpl">
<property name="maxCacheSize" value="${session.document.cache.size}" />
<property name="businessObjectService">
<ref bean="businessObjectService" />
</property>
<property name="sessionDocumentDao">
<ref bean="sessionDocumentDao" />
</property>
</bean>
</beans>
This file needs to be added to your web project so that it can be accessed from the classpath. For this example, it has been added to src/main/resources/edu/sampleu within our web project. With that in place, the following (adjusting for the actual path) should be added to your rice-config.xml file:
<param name="rice.kr.additionalSpringFiles">classpath:edu/sampleu/KNSOverrideSpringBeans.xml</param>
Note that if you already have a rice.kr.additionalSpringFiles configuration parameter specified, the value is treated as a comma separated list, so you can add a comma at the end of the present value and append on the configuration for the KNSOverrideSpringBeans.xml file.
Added documentation into the installation guide as noted.