This content has been marked as final.
Show 3 replies
-
1. Re: JBoss Clustering, no Failover ?
krajwade Aug 19, 2010 9:05 PM (in response to steppi)Did you got the solution to this problem ? I am facing exactly the same issue.
-
2. Re: JBoss Clustering, no Failover ?
saradakrishna Aug 23, 2010 7:53 AM (in response to krajwade)STEPS TO BE FOLLOWED:-Below is a typicaldeploy/jbossweb-cluster.sar/META-INF/jboss-service.xml
file. The configuration attributes in theTomcatClusteringCache
MBean are very similar to those in the JBoss AS cache configuration.<mbean code="org.jboss.cache.aop.TreeCacheAop"
name="jboss.cache:service=TomcatClusteringCache">
<depends>jboss:service=Naming</depends>
<depends>jboss:service=TransactionManager</depends>
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="TransactionManagerLookupClass">
org.jboss.cache.BatchModeTransactionManagerLookup
</attribute>
<attribute name="IsolationLevel">REPEATABLE_READ</attribute>
<attribute name="CacheMode">REPL_ASYNC</attribute>
<attribute name="ClusterName">
Tomcat-${jboss.partition.name:Cluster}
</attribute>
<attribute name="UseMarshalling">false</attribute>
<attribute name="InactiveOnStartup">false</attribute>
<attribute name="ClusterConfig">
... ...
</attribute>
<attribute name="LockAcquisitionTimeout">15000</attribute>
<attribute name="SyncReplTimeout">20000</attribute>
</mbean>Note that the value of the mbean element's code attribute is org.jboss.cache.aop.TreeCacheAop, which is different from the other JBoss Cache Mbeans used in JBoss AS. This is because FIELD granularity HTTP session replication (covered below) needs the added features of theTreeCacheAop
(a.k.a.PojoCache
) class.To enable clustering of your web application you must tag it as distributable in theweb.xml
descriptor. Here's an example:<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<distributable/>
<!-- ... -->
</web-app>You can futher configure session replication using thereplication-config
element in thejboss-web.xml
file. Here is an example:<jboss-web>
<replication-config>
<replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-trigger>
<replication-granularity>SESSION</replication-granularity>
<replication-field-batch-mode>true</replication-field-batch-mode>
</replication-config>
</jboss-web>
Please try the above steps.
Hope it will help you. -
3. Re: JBoss Clustering, no Failover ?
krajwade Sep 7, 2010 1:09 PM (in response to saradakrishna)Thanks Sarada for detail steps. I followed all these steps but still was not able to get session fail over. I have stateful ejb's in my EAR file that I deployed in farm folder. Does it need some special attention ?