There are 2 CentOS machines. There is a GlassFish cluster on them. Also there are 2 HTTPDs configured with mod_jk as Load balancers for this cluster. And there are keepalived pointing to these machines having single Virtual IP as described in this tutorial http://blogs.nologin.es/rickyepoderi/index.php?/archives/53-Simple-but-F.... Everythings works great.
A have created a web application with these xml descriptors and deployed to cluster and set availability=true. So got session replicated on instances.
-- These xml are added to WEB-INF --
glassfish-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<session-config>
<session-manager persistence-type="replicated">
<manager-properties>
<property name="relaxCacheVersionSemantics" value="true"/>
</manager-properties>
</session-manager>
</session-config>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<distributable/>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Question: How to achieve the Stateful EJB state replication on this cluster? What settings should be done, for instance to get the same counter value defined in Stateful EJB via web service?
Thanx in advance.