Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Partitioned EJB overview

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

Partitioned stateless session bean

A partitioned stateless session bean (PSSB) must implement the partitioning facility (WPF) framework API and utilize the PartitionManager interface to create and manage partitions. In addition, a [BEAN_NAME]_PartitionKey class must be implemented and called by the workload routing to determine the partition endpoint to which the request routes.

PSSB [BEAN_NAME]_PartitionKey Routing Class

The programmer implementing WPF must implement a [BEAN_NAME]_PartitionKey class to direct where the method request is routed within the cluster. The endpoint is a partition and is described using a string. For example, in the partitioning facility's various samples, the following classes with the [BEAN_NAME]_PartitionKey are implemented and display in a similar way to the following examples:


 * PartitionKey for Partitioned Stateless Session Bean WPFKeyBasedPartition
public class WPFKeyBasedPartition_PartitionKey {
     * return the partition string as the partition key
     * @param partition
     * @return
    public static String buy(String partition) {
        return partition;

In this case, from the WPFFacadePartitionSample PSSB the bean only has a single static remote method, buy(String) which has the partition destination passed in. The user receives all method arguments passed to the signature, and can process them, as required, to determine which partition endpoint cluster member hosts the work.

All methods in the remote interface of the PSSB should be implemented.

The PSSB bean needs to have its generated stub updated

The wpfstubutil is a utility that regenerates the stub and inserts the appropriate interfaces to enable the [BEAN_NAME]_PartitionKey class to be called for each route method execution. This tool should be called each time after the enterprise bean is deployed. The deployment process will result in the file being rewritten without these modifications.

Administrators want to avoid deploying when installing a partitioned Java™ 2 Platform Enterprise Edition (J2EE) application within the cluster. This resets the generated stub, and the required partitioning facility framework changes are present at runtime. For examples of the updated stub, review the samples in the installApps directory beginning with D_*.

Parent topic:

Partitioned EJB overview

Related concepts

Partitioned EJB overview