My webMethods Server 10.1 | My webMethods Server Webhelp | Document Conventions | My webMethods Administrator Functions | My webMethods Server Clustering | Partitioning Applications on Cluster Nodes | Creating and Modifying Partitions | Example: Creating Cluster Partitions
 
Example: Creating Cluster Partitions
The following procedure shows the creation of cluster partitions by editing configuration files. This procedure is intended as a demonstration and is not a real-world example. Prior to this procedure, a cluster exists, having five nodes:
default
node2
node3
node4
node5
The example creates three partitions for the cluster:
default (all portlets are enabled)
partition2 (a specified group of portlets is disabled)
partition3 (a specified group of portlets is disabled, but some are temporarily enabled)
*To create partitions through editing configuration files
1. At a command line prompt, type the following command to move to the server’s bin directory:
cd Software AG_directory\MWS\bin
2. To retrieve the clusterPartitions.xml file from the My webMethods Server database, type this command:
mws getconfig clusterPartitions.xml
3. To retrieve the phaseProvider.xml file from the My webMethods Server database, type this command:
mws getconfig phaseProvider.xml
4. To retrieve the defaultPartitionPortlets.properties file from the My webMethods Server database, type this command:
mws getconfig defaultPartitionPortlets.properties
5. Open the downloaded clusterPartitions.xml file in a text editor.
You can find all the downloaded files at this location:
Software AG_directory \MWS\server\serverName\config
6. Edit the clusterPartitions.xml file using the syntax in The Cluster Partition File to add partition2 and partition3 to the cluster.
The modified clusterPartitions.xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<ClusterPartitions>
<Partition name="default" frontEndUrl="http://my.company.server:8585">
<Component name="default">
</Component>
</Partition>
<Partition name="partition2">
<Component name="node2">
</Component>
<Component name="node3">
</Component>
</Partition>
<Partition name="partition3">
</Partition>
</ClusterPartitions>
Based on this file:
*The default partition contains the default node
*partition2 contains node2 and node3
*partition3 contains node4 and node5 (the last partition in the file contains all nodes not specifically assigned to other partitions)
7. Save and close the clusterPartitions.xml file.
As a result, the default partition is established according to the The Default Partition Configuration, with all portlets enabled.
8. Make a copy of phaseProvider.xml and name it partition2PhaseProvider.xml.
9. Open the partition2PhaseProvider.xml file in a text editor.
10. In the portlet phase nested inside the CoreServices phase, change defaultPartitionPortlets.properties to partition2Portlets.properties so the file looks like this:
<PhaseInfo name="portlet" enabled="true"
class="com.webmethods.portal.service.portlet.impl.PortletProvider"
initFile="config:/partition2Portlets.properties"
initFileComponentsEnabled="false"/>
The phase provider now points to partition2Portlets.properties. Because initFileComponentsEnabled is set to false, portlets listed in that file will be disabled.
11. Save and close the partition2Portlets.properties file.
12. Make a copy of defaultPartitionPortlets.properties and name it partition2Portlets.properties.
13. Open the partition2Portlets.properties file in a text editor and add a list of the portlets that are to be disabled in partition2.
For example:
# These portlets will not be initialized.
wm_task_chart___taskchart=
wm_task_search___taskinboxsearchbar=
wm_task_search___taskinboxsearchresults=
wm_task_search___tlmsearchresults=
wm_task_search___tlmsearchquery=
In the user interface, these portlets have the following uses:
*taskchart displays Task Charts
*tlmsearchquery displays Task List Management
*The remaining portlets display My Inbox
14. Save and close the partition2Portlets.properties file.
As a result, certain portlets will be disabled on partition2 (node2 and node3).
Note:
The procedure steps for partition3 demonstrate how to temporarily override a phase provider file. As a result, the steps are abbreviated because they largely duplicate the steps for partition2.
15. Make a copy of phaseProvider.xml and name it partition3PhaseProvider.xml.
16. In partition3PhaseProvider.xml change, defaultPartitionPortlets.properties to partitionPortlets.properties.
17. Make a copy of partition2Portlets.properties and name it partition3Portlets.properties.
As a result, partition3 is configured to disable the same portlets as partition2.
18. In partition3Portlets.properties, prefix the = at the end of the last two portlets with a +.
For example:
# These portlets will not be initialized.
wm_task_chart___taskchart=
wm_task_search___taskinboxsearchbar=
wm_task_search___taskinboxsearchresults=
wm_task_search___tlmsearchresults+=
wm_task_search___tlmsearchquery+=
Note:
The choice of portlets is arbitrary for this example.
As a result, partition3 (node4 and node5) has the same portlets disabled as partition2, but a subset of the portlets are enabled.
19. To deploy the new and revised files to the My webMethods Server database, type this command for each file:
mws putconfig fileName
20. Delete all of these files from the \serverName\config directory.
If you do not delete the files, cluster will continue to use the local version of the configuration file.
21. Restart each node in the cluster using this command:
mws -  serverName restart
Changes to configuration files are not applied until after a restart.