O'Reilly logo

JBoss AS 7 Configuration, Deployment, and Administration by Francesco Marchioni

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Clustering web applications

Clustering web applications requires the least effort for the developer. As we have just discussed, all you need to switch on clustering in a web application is adding the following directive in the web.xml descriptor:

<web-app>
<distributable/>
</web-app>

By default, clustered web applications will use the web cache contained in the Infinispan configuration. One thing you can customize is setting up a specific cache per deployment unit. This can be achieved by adding to jboss-web.xml the replication-config directive containing the cache name to be used:

<jboss-web>
<replication-config>
<cache-name>web.dist</cache-name>
</replication-config>
</jboss-web>

The previous configuration should obviously reference a cache ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required