Installation guide

95
CHAPTER 20
Creating Pramati Server Clusters Using XMLs
Whenever there is any state change for Web sessions, the information is replicated across all other
nodes. This may prove expensive on memory and hence it is better to set ‘replication-on-all-nodes’ to
false. When the ‘replication-on-all-nodes’ are set to ‘false, only the backup nodes are notified for
replication. The Web cluster persistence information can be stored in a DB.
Setting up EJB Persistence
EJB session persistence for J2EE Cluster could be in-memory or database based. In case of database-
based persistence, provide all the database information like URL, table name, etc. The following
snippet is taken from
cluster_config.xml:
<ejb-session-persistence>in-memory</ejb-session-persistence>
<persist-info>
<url />
<driver />
<user />
<password />
<table-name />
</persist-info>
The above example uses In-memory EJB session persistence.
Updating cluster configuration using XML (when DB is used for configuration)
Once cluster is enabled in server_config.xml, the cluster topology and properties are defined in
the
cluster_config.xml. Cluster nodes, topology, persistence (EJB/Web) and Load Balancer will
be specified here. After the initial configuration of the cluster, the cluster configuration may be
modified using the Console or the XMLs.
In a file based persistence, once the config XMLs are modified in any of the nodes, and the cluster is
restarted, the new configuration takes effect and is synched-up with all other nodes.
When DB is used for config persistence, the following steps need to be followed to update the
configuration in the DB, using local XMLs to provide the information:
The cluster must be stopped
In any of the nodes, update the required config XML
Start the node, where the XMLs were modified:
After any change in the configuration, to update the database, start cluster node with the
following option:
com.pramati.Server -node <NODENAME> -updatelocalconfig
This updates all of the configuration files.
To update specific configuration changed manually, start cluster node with the following
startup option:
com.pramati.Server -node <NODENAME> -updatelocalconfigfor
<SERVICENAME>[<SERVICENAME>]
Only this node needs this option and the rest would automatically use updated configuration.