Package
com.ibm.websphere.wpf
Interface Summary |
PartitionHandlerLocal | Any application that uses partitions must contain a session bean with this
local interface. |
PartitionHandlerLocalHome | The single partitioned stateless session bean (PSSB) in the jar
must use this interface for their local home interface. |
PartitionDefinition | PartitionDefinition represents a partition. |
PartitionManager | The PartitionManager interface provides the runtime support to create, remove, add, diable or
remove a partition as the application developer requries. |
Class Summary |
PartitionScope | This enumeration tells WPF whether a partition should be node or cluster scoped. |
Package Description
This allows applications which can be partitioned to be identified to the WebSphere
runtime. Just create a session bean that uses these interfaces for its local interface
and local home interface.
Required jars
Applications that use these APIs must have the navajo.jar on their classpath. This
is located in the lib directory of a WAS-E 5.1 installation.
Partitioned Applications
A partition bean is a stateless or stateful session bean. These beans must use com.ibm.websphere.navajo.PartitionHandlerLocalHome as
its home interface and com.ibm.websphere.navajo.PartitionHandlerLocal as the local interface. These must be used
and cannot be extended. The PartitionHandlerLocal interface has several methods that must be implemented for the application
partitioning to work correctly.
Both methods can be any TX_ attribute except for TX_MANDATORY. It is also acceptable if the bean uses bean
managed transactions. In this case, then any TX_ attribute in these methods is ignored.
An ejb jar in an EAR may contain one of these beans. When an application is started then WebSphere
will find any session beans that specified the PartitionHandlerLocalHome and PartitionHandlerLocal interfaces.
Identifying partitions
Partitions are initially identified when the runtime calls the {@link PartitionHandlerLocal#getPartitions } method.
The application can also add/remove partitions at runtime using the {@link PartitionRuntime#addPartition } and the
{@link PartitionRuntime#removePartition } methods. These methods need be called on one cluster
member for it to take effect on all members of the cluster. Obviously, if a partition is
to be permanent then it must be persisted so that future new servers starting will return the
new partition during {@link String[] PartitionHandlerLocal#getPartitions() }. If a partition is
added dynamically then all currently online servers will also add it. However, a new
server that is started after this will not know about that partition unless it returns
it as part of getPartitions.
A reference to PartitionRuntime is located in the EJB/web apps JNDI space at {@link PartitionRuntime.JNDI_NAME}
Security
If security is on then the local methods should be declared with a role if they call another other EJBs.
Best practices