• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Clustering with Stateful Session Beans in JBoss

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

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
Aspired to become an JBOSS Experience Manager?
Explore the post to discover the know-hows on JBOSS Traingin.

These configuration 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:

  •  idleTimeoutSeconds: Time in seconds a 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 a 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 idleTimeoutSeconds and maxSize to 0.

For indepth understanding on JBoss click on:

Summary
Review Date
Reviewed Item
Clustering with Stateful Session Beans in JBoss
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Clustering with Stateful Session Beans in JBoss"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.