Clustering with Stateful Session Beans in JBoss

Ratings:
(4)
Views:0
Banner-Img
  • Share this blog:

 

Clustering with Stateful Session Beans in JBoss

Stateful Session Beans have a state for a client Fail-over and Reliability ⇒ Fault-tolerant State managed by JBoss Cache To enable clustering for SFSB, it works the same way as clustering SLSB except that:

  • There is only one load-balancing policy available: FirstAvailable (default for SFSB)
  •  This time JBoss Cache is used because the state has to be managed

 

To enrich your career and become a JBoss professional, visit Tekslate, the global online training platform:" JBoss Training". This course will help you achieve excellence in this field.

sfsb-cache cache configuration is located in:

  • deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-configs.xml(You can enable this file in the JBoss-cache-manager-jboss-beans.xml file): Describes cache configuration using the standard JBC 3.x config format
  •  deploy/cluster/jboss-cache-manager.sar/META-INF/jboss-cache-manager-jboss-beans.xml: Describes cache configuration using the microcontainer format

These configurations affect all SFSB. You can override this configuration for your SFSB though:

  • By annotating with @org.jboss.ejb3.annotation.CacheConfig
  •  In the jboss.xml file with <cache-config>...</cache-config>

The parameters you can configure are the following:

  •  idle-timeout seconds: Time in seconds an SFSB can be unused before being passivated (default 300)
  •  maxSize: maximum number of beans that can be cached (default 10000)
  • name: Specify the name of the cache configuration. sfsb-cache is the default for SFSB
  • removalTimeoutSeconds: Time in seconds an SFSB can be unused before being deleted by the cache (default 0)
  •  replicationIsPassivation: Should a replication be considered as passivation? (default true)

Example: To disable passivation, you could set idle-timeout seconds and maxSize to 0.

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox