Glassfish Cluster

From Documentation

Setup Glassfish Cluster environment

Refer to this blog to set up glassfish cluster environment.

Additional setting in ZK project

You have to configure the following settings to make ZK project work in glassfish cluster environment.


  • Add the distributable element in WEB-INF/web.xml.
<?xml version="1.0"?>
<web-app  xmlns=""



  • Create sun-web.xml under projectName/WEB-INF folder to replicate session between cluster nodes.

For example,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" 
        <session-manager persistence-type="replicated">
                <property name="persitencerequency" value="web-method" />
                <property name="persistenceScope" value="session" />

Version History

Last Update : 2022/01/19

Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.