![]() |
|
You can create a node or cluster using the config-topology-standalone-template.xml and config-topology-cluster-template.xml located at <install_dir>\server\templates\.
Using these XML templates, you can convert existing node types, create nodes for a cluster, and configure persistence properties for the database, EJB, or Web.
Converting a node type is useful if you want to convert an existing, for example, Standalone J2EE Server to an EJB cluster type. To do this, open the config-topology-cluster-template.xml:
<configuration-topology>
<!-- Valid Types - a J2EE(EJB/BOTH/WEB) Cluster or a JMS Cluster -->
<!-- SAMPLE CONFIGURATION, change node definitions as required -->
<cluster name="MyCluster" type="J2EE">
<convert-nodes>
<!-- These are nodes for conversion. The server "J2EESAS1" of the given ip in the
Table 1: Description of attributes for
| Attributes | Description |
| node name | Names of the target node. That is the node that is to be created. |
| type | The type of the target node that is to be created. |
| naming-port | Naming ports of the target node. |
| http-port | HTTP ports of the target node. |
| source-node ip | The IP of the source machine on which this node is started. The default value is local host. |
| name | Name of the source node. |
If you wish to create a J2EE cluster, locate the create-nodes tag in the config-topology-cluster-template.xml:
<create-nodes>
<node name="nodename1" type="both">
<ip>localhost
<naming-port>9292
<http-port> 8282
</node>
<node name="nodename2" type="both">
<ip>localhost
<naming-port>9293
<http-port> 8283
</node>
</create-nodes>
Table 2: Description of attributes for
To define the properties for persistence, modify the
Attributes
Description
node name
Name of the cluster node.
type
The type of the cluster - EJB, Web, or BOTH.
ip
The IP of the machine on which this node is being created. The default value is local host.
naming-port
Naming ports of the node.
http-port
HTTP port of the node.
configuration-persistence tag in the config-topology-cluster-template.xml:
<!-- Use "db" for DB persistence.-->
<configuration-persistence type="file">
<property name="driver" value=""/>
<property name="url" value=""/>
<property name="user" value=""/>
<property name="password" value=""/>
<property name="tablename" value=""/>
</configuration-persistence>
<!-- The default type here is "in-memory", use "db" for DB persistence.-->
<ejb-cluster-persistence>
<property name="driver" value=""/>
<property name="url" value=""/>
<property name="user" value=""/>
<property name="password" value=""/>
<property name="table-name" value=""/>
</ejb-cluster-persistence>
<!-- EJB Timer service enabling. Set enabled="true" for enabling it. Default is false. Specify datasource name and table name for timer persistence. The datasource name should be an existing datasource. The datasource can be created, while creating the node by specifying a configuration file (-configuration flag). If the timer service is disabled, then EJB timer service can't be used on any of the cluster nodes.-->
<ejb-timer-service enabled="false">
<property name="datasource-name" value=""/>
<property name="table-name" value=""/>
</ejb-timer-service>
<!-- The default type here is "in-memory", use "db" for DB persistence.-->
<web-cluster-persistence>
<property name="url" value=""/>
<property name="url" value=""/>
<property name="user" value=""/>
<property name="password" value=""/>
<property name="table-name" value=""/>
</web-cluster-persistence>
<!-- The upload-config allows pre-configuring the created cluster. For example, the configuration for nodename1 would be uploaded to the DB and this configuration would be synced up to the other nodes.-->
<upload-config-source-node name="nodename1"/>
</cluster>
</configuration-topology>
Related Topics:
![]()
© Pramati Technologies 2007
Runs on Pramati Server | Feedback | Legal