Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Partitioning facility framework programming model

Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.


The PartitionHandlerLocal interface defines callback methods that enable the application to receive specific partition lifecycle events from the partitioning facility runtime. There are four methods on this interface.


The getPartitions method is called when the application is started in a cluster member. This method is called once on every cluster member every time the application starts. This method signature is:

PartitionDefinition[] getPartitions()

The method should return an array of PartitionDefinition objects. There should be exactly one PartitionDefinition for every partition the application can host in this cluster member. A cluster member can only be a candidate for a partition when that partition has been returned from getPartitions.

IBM recommends that the application always return the same set of partitions on each cluster member.

The highly available (HA) manager policies can be used to limit the partition to activation on certain cluster members or even 'pin' a partition to a particular cluster member. Following is an example getPartitions method:

    public PartitionDefinition[] getPartitions()
        PartitionDefinition[] rc = new PartitionDefinition[10];
        for(int i = 0; i
< rc.length; ++i)
            rc[i] = ivRuntime.createPartitionDefinition("" + i);
        return rc;

This returns 10 partitions to the runtime. The partitions are named:


They are all created using the default classification.


The HA manager calls the partitionLoadEvent when a partition is activated on a cluster member. This gives the application the opportunity to perform required initialization prior to receiving IIOP requests for the specified partition (the partition name is provided as a string parameter). The partionLoadEvent method signature is:

boolean partitionLoadEvent(String partitionName)

The following sentence does not apply in z/OS.

The method should return true if the cluster member is ready to accept work for the specified partition.

Once the method returns, the IIOP routing tables are updated and incoming IIOP requests will be delivered to this cluster member for the specified partition.

If the method returns false, then the HA manager disables the cluster member for this partition and will try to activate the partition on a different cluster member based upon the current policy. This disabling only applies to the partition passed to the method, other partitions may still be activated on this cluster member. Applications that return false should ensure that adequate trace is enabled to allow the administrator to diagnose the problem. If the problem is determined to be transient in nature, then the administrator can use JMX to enable the cluster member again for that specific partition.

If an application is using messaging to accept incoming requests for a partition (as opposed to direct IIOP routing) then the application should subscribe at this time to the topics or queues on which the requests can arrive.


The HA manager calls the partitionUnloadEvent method when a partition is deactivated. The event tells the application to stop processing requests for the specified partition. The partitioning facility runtime updates the IIOP routing table for this cluster member prior to invoking this callback. The method has the following signature:

void partitionUnloadEvent(String partitionName)

If an application is using messaging to accept incoming requests (as opposed to direct IIOP routing) then it should unsubscribe to the topics/queues on which those requests arrive. The HA manager will not activate a replacement cluster member until this method returns.


The isPartitionAlive method is only called when the policy controlling the partition has the isAlive attribute set to true in the CoreGroup Policy in effect for this partition set (see wpfadmin policy overview and policy command examples).

The default partitioning facility partition policies disable this call back, and as for many partitions, the overall cluster performance can be affected. For very tightly managed environments, they may wish to manage this attribute in an active manner.

When the HA manager policy isAlive attribute is true, this method is called every X seconds (also set in the policy) while a partition is activating/active or deactivating. The interval is in seconds and is specified using a different attribute on the controlling policy. The isPartitionAlive method is never called when the isAlive policy attribute is set to false. The method signature is:

boolean isPartitionAlive(String partitionName)

If the method returns false then the JVM is 'panicked', or the JVM is halted, and another cluster member is chosen to host the partition. The application can use this method to verify that the partition is operating correctly, perhaps by asking a peer cluster member to invoke a partition method to perform a ping type operation or sanity check from a remote JVM.

Parent topic:

Partitioning facility framework programming model

Related concepts

Partitioning facility framework programming model


Search Tips   |   Advanced Search