Installation guide

93
CHAPTER 20
Creating Pramati Server Clusters Using XMLs
Enable Cluster Service.
<service name="ClusterService" enabled="true"
class-name="com.pramati.cluster.PramatiClusterService">
•Setup Persistence.
Setup Cluster topology in cluster-config.xml.
Note: Make sure the node types mentioned in the node definitions in cluster-config.xml are of the type
BOTH, Web or EJB. For more information, refer to ‘Creating a Cluster Instance’.
J2EE Cluster Node Types
The Cluster node types for both the nodes are indicated as BOTH, which means both the Web and
EJB Services are running on that node. The node types allowed are:
BOTH – If a cluster node is defined as BOTH, both EJB and Web containers are started. Select
this option when the application has both enterprise and web components. If you specify BOTH,
it is required that you enable both EJB and Web Services from the
server_config.xml file as
shown in the snippet:
<service name="WebContainer" enabled="true"
class-name="com.pramati.web.WebServer">
<service name="EJBContainer" enabled="true"
class-name="com.pramati.ejb.EJBContainer">
Web – If a cluster node is defined as Web, only the Web container is started. EJB components are
not available on this node. Select this option when the application has only JSPs and other web
components. A Standalone Web node can act as an EJB Load Balancer. A snippet from
server_config.xml:
<service name="WebContainer" enabled="true"
class-name="com.pramati.web.WebServer">
<service name="EJBContainer" enabled="false"
class-name="com.pramati.ejb.EJBContainer">
EJB – If a cluster node is defined as EJB, only the EJB container is started. Web components are
not available on this node. Select this option when the application consists of only enterprise
beans. A snippet from
server_config.xml:
<service name="WebContainer" enabled="false"
class-name="com.pramati.web.WebServer">
<service name="EJBContainer" enabled="true"
class-name="com.pramati.ejb.EJBContainer">
To summarize:
Table 32: J2EE Cluster Node Type and required services
J2EE Node Type Web Container EJB Container
BOTH Required Required