IBM WebSphere Extended Deployment (XD)TM
Release 5.1

com.ibm.websphere.wpf
PartitionManager



The PartitionManager interface provides the runtime support to create, remove, add, diable or remove a partition as the application developer requries. An instance is bound to the jndi space of a Partition Statless Session Bean. It allows partitions to be dynamically added and removed once the server is up and running.

Field Summary
public  StringJNDI_NAME
           This is the jndi name to find this instance in a partition handler EJB. It is.
public  intFAULT_GRACEFUL
           The FAULT_GRACEFUL return value reflects that JVM is ok and this fault impacts this partition only. Use.
public  intFAULT_PANIC
           The FAULT_GRACEFUL return value reflects that JVM is compromized and should be dropped in total. Use.

Method Summary
public  addPartition
           This dynamically adds a new partition to the application with the specified name.
public  removePartition
           This dynamically removes a partition from the application. Calling this method.
public  disablePartition
           This dynamically disables a partition. Calling this method.
public  getPartitions
           This returns all the current partitions registered with an application.
public  getApplicationName
           This returns the application name used when installing the partitioned J2EE application.
public  reportPartitionFault
           This can be called to report a fault with the operation of an active partition.
public  reportTransactionComplete
           This should be called to inform the runtime when a transaction/operation completes on this partition.
public  reportTransactionFailed
           This should be called to inform the runtime when a transaction/operation fails on this partition.
public  createPartitionDefinition
           This returns a partition definition with standard/default class. This doesn't create.
public  createPartitionDefinition
           This returns a partition definition with standard/default class. This doesn't create.
public  createPartitionDefinition
           This returns a partition definition with standard/default class. This doesn't create.
public  setHttpPartitionManager
           This indicates to WPF that this application uses HTTP Partitioning.

Field Detail

JNDI_NAME

public 
  static JNDI_NAME
This is the jndi name to find this instance in a partition handler EJB. It is only present on these EJBs, not all EJBs in a partitioned application.

FAULT_GRACEFUL

public 
  static FAULT_GRACEFUL
The FAULT_GRACEFUL return value reflects that JVM is ok and this fault impacts this partition only. Use of this API value is reserved at this time. See the reportPartitionFault() API.

FAULT_PANIC

public 
  static FAULT_PANIC
The FAULT_GRACEFUL return value reflects that JVM is compromized and should be dropped in total. Use of this API value is reserved at this time. See the reportPartitionFault() API.

Method Detail

addPartition

public void addPartition(PartitionDefinition name)
This dynamically adds a new partition to the application with the specified name. Calling this method adds the partition to all cluster members, there is no need to call it on each member individually.
Parameters:
name - The new partition name.

throws
java.lang.IllegalStateException - This dynamically adds a new partition to the application with the specified name. Calling this method adds the partition to all cluster members, there is no need to call it on each member individually.

removePartition

public void removePartition(String name)
This dynamically removes a partition from the application. Calling this method removes the partition on all cluster members, there is no need to call it on each member individually.
Parameters:
name - The partition to remove.

throws
java.lang.IllegalStateExceptioncom.ibm.websphere.wpf.UnknownPartitionException - This dynamically removes a partition from the application. Calling this method removes the partition on all cluster members, there is no need to call it on each member individually.

disablePartition

public void disablePartition(String name)
This dynamically disables a partition. Calling this method disables the partition on the current cluster members. This can also be accomplished via the wpfadmin command.

When the method is invoked, the partition will either enter a deactivated state or activate immediately on another cluster member capable of hosting the partition. The partition would be deactivated depending on the current policy settings, but by default activated on another cluster member if one is available. If partition is not automatically reactivated, wpfadmin can be used to enable the member once the administrator can review the logs and determine any action that should be done prior to reenabling the partition.

partitionUnloadEvent(...) is not called as the application will call this method and can clean as much as is possible prior to the ivocation.

Parameters:
name - The partition to disable.

throws
java.lang.IllegalStateExceptioncom.ibm.websphere.wpf.UnknownPartitionException - This dynamically disables a partition. Calling this method disables the partition on the current cluster members. This can also be accomplished via the wpfadmin command.

When the method is invoked, the partition will either enter a deactivated state or activate immediately on another cluster member capable of hosting the partition. The partition would be deactivated depending on the current policy settings, but by default activated on another cluster member if one is available. If partition is not automatically reactivated, wpfadmin can be used to enable the member once the administrator can review the logs and determine any action that should be done prior to reenabling the partition.

partitionUnloadEvent(...) is not called as the application will call this method and can clean as much as is possible prior to the ivocation.


getPartitions

public String getPartitions()
This returns all the current partitions registered with an application.

returns:
An array of Strings listing all partition names.
throws
java.lang.IllegalStateException - This returns all the current partitions registered with an application.

getApplicationName

public String getApplicationName()
This returns the application name used when installing the partitioned J2EE application.

returns:
String.

reportPartitionFault

public void reportPartitionFault(String partitionName,int severity)
This can be called to report a fault with the operation of an active partition. The severity allows wpf to determine what action to take. This API is reserved by IBM at this time. At this time, the disablePartition(String) API should be used to handle error conditions.
Parameters:
partitionName - The source partition detecting the fault.
severity - This needs to be one of FAULT_* report codes.

throws
java.lang.IllegalStateException - This can be called to report a fault with the operation of an active partition. The severity allows wpf to determine what action to take. This API is reserved by IBM at this time. At this time, the disablePartition(String) API should be used to handle error conditions.

reportTransactionComplete

public void reportTransactionComplete(String partitionName,long responseTime_ms)
This should be called to inform the runtime when a transaction/operation completes on this partition. This is used to populate the WPF performance monitoring infrastrucutre. Each time this is called, the transaction will be counted and the response time will be noted.
Parameters:
partitionName - the name of the partition.
responseTime_ms - the response time for the transaction.

throws
java.lang.IllegalStateException - This should be called to inform the runtime when a transaction/operation completes on this partition. This is used to populate the WPF performance monitoring infrastrucutre. Each time this is called, the transaction will be counted and the response time will be noted.

reportTransactionFailed

public void reportTransactionFailed(String partitionName)
This should be called to inform the runtime when a transaction/operation fails on this partition. This is used to populate the WPF performance monitoring infrastrucutre. Each time this is called, the failed transaction will be counted.
Parameters:


createPartitionDefinition

public PartitionDefinition createPartitionDefinition(String partitionName)
This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application. The partition has cluster scope.
Parameters:

returns:
A PartitionDefinition representing a cluster scoped partition.
throws
java.lang.IllegalArgumentException - This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application. The partition has cluster scope.

createPartitionDefinition

public PartitionDefinition createPartitionDefinition(String partitionName,String partitionClass, PartitionScope scope)
This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application. PartitionScope
Parameters:
partitionName - The name of the partition.
partitionClass - The desired classification for it.
scope - Whether this partition is node or cluster scoped.

returns:
A PartitionDefinition representing a cluster or scoped partition.
throws
java.lang.IllegalArgumentException - This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application.

createPartitionDefinition

public PartitionDefinition createPartitionDefinition(String partitionName,String partitionClass, PartitionScope scope, Map attrMap)
This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application. PartitionScope
Parameters:
partitionName - The name of the partition.
partitionClass - The desired classification for it.
scope - Whether this partition is node or cluster scoped.
attrMap - of attributes (String key and value) pairs users can use associate for policy management.

returns:
A PartitionDefinition representing a cluster or scoped partition.
throws
java.lang.IllegalArgumentException - This returns a partition definition with standard/default class. This doesn't create a 'real' partition, it returns a PartitionDefinition object for the use of the application.

setHttpPartitionManager

public void setHttpPartitionManager(HttpPartitionManagerInterface manager)
This indicates to WPF that this application uses HTTP Partitioning.
Parameters:
manager - is the HttpPartitionManager instance.


IBM WebSphere Extended Deployment (XD)TM
Release 5.1