com.ibm.websphere.wpf
Interface PartitionHandlerLocal

All Superinterfaces:
javax.ejb.EJBLocalObject

public interface PartitionHandlerLocal
extends javax.ejb.EJBLocalObject

Any application that uses partitions must contain a session bean with this local interface. It shouldn't extend this, it needs to specify this interface exactly. This is similar to start up beans.

All methods here should use TX_REQUIRES_NEW and if security is on then they should also use RUN_AS_SPECIFIED role.


Method Summary
 PartitionDefinition[] getPartitions()
          This is called when the application is started on a JVM.
 boolean isPartitionAlive(java.lang.String partitionName)
          This can be called periodically to check the health of a specific partition.
 boolean partitionLoadEvent(java.lang.String partitionName)
          This is called when the group for a specific partition is activated by the HAManager.
 void partitionUnloadEvent(java.lang.String partitionName)
          This is called when a partition is being withdrawn from this server.
 
Methods inherited from interface javax.ejb.EJBLocalObject
getEJBLocalHome, getPrimaryKey, isIdentical, remove
 

Method Detail

getPartitions

PartitionDefinition[] getPartitions()
This is called when the application is started on a JVM. The runtime asks the bean for a list of all partitions known the the application. The application would typically do a finder method and identify them and then return an array of these strings. The runtime will then create a group for each partition and join that group in the cluster. This currently doesn't allow a new partition to be added after this.

Returns:
The names of all partitions.
See Also:
PartitionManager

partitionLoadEvent

boolean partitionLoadEvent(java.lang.String partitionName)
This is called when the group for a specific partition is activated by the HAManager.

Parameters:
partitionName - The name of the partition that has just been assigned to this server.
Returns:
true if the load event was processed correctly, a return value of false causes a panic.

partitionUnloadEvent

void partitionUnloadEvent(java.lang.String partitionName)
This is called when a partition is being withdrawn from this server. This can happen because of a load balancing decision. This method is called first and then after it returns the partitionLoadEvent is fired on the new server.

Parameters:
partitionName - The partition being withdrawn.

isPartitionAlive

boolean isPartitionAlive(java.lang.String partitionName)
This can be called periodically to check the health of a specific partition. This method when called should verify the partition is operating correctly and return true. If the isAlive method does not return in a timely fashion then the runtime may terminate the JVM abruptly. This is called as long as a partition is activating/activated/deactivating. As this does impact peformance, this callback is disabled by default. The wpfadmin command can enable and set the interval this callback excercised.

Parameters:
partitionName - The name of the partition to test.
Returns:
true if the partition is ok.