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.
Partitioning facility requirements
This section describes key requirements to ensure a partitioned stateless session bean (PSSB) has valid partitioning facility (WPF) framework implementation.
PSSB Local Interfaces
When implementing a PSSB, it must be a stateless bean and the following interfaces must be used:
Interface enterprise bean-jar descriptor Interface Local Home local-home com.ibm.websphere.wpf.PartitionHandlerLocalHome Local local com.ibm.websphere.wpf.PartitionHandlerLocal
For example, the ejb-jar.xml for WPFKeyBasedPartition is...
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans™ 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd"> <ejb-jar id="ejb-jar_ID"> <display-name>WPFKeyBasedPartitionEJBdisplay-name> WPFKeyBasedPartitionEJB> <enterprise-beans> <session id="WPFKeyBasedPartition"> <ejb-name>WPFKeyBasedPartitionejb-name>WPFKeyBasedPartition> <home>com.ibm.websphere.wpf.ejb.WPFKeyBasedPartitionHomehome> com.ibm.websphere.wpf.ejb.WPFKeyBasedPartitionHome</home> <remote>com.ibm.websphere.wpf.ejb.WPFKeyBasedPartition </remote> <local-home>com.ibm.websphere.wpf.PartitionHandlerLocalHome </local-home> <local>com.ibm.websphere.wpf.PartitionHandlerLocal</local> <ejb-class>com.ibm.websphere.wpf.ejb.WPFKeyBasedPartitionBean </ejb-class> <transaction-type>Container</transaction-type> <env-entry> <description>The number of partitions this session bean will create</description> <env-entry-name>NumberOfPartitions</env-entry-name> <env-entry-type>java.lang.Integer</env-entry-type> <env-entry-value>10</env-entry-value> </env-entry> </session> </enterprise-beans> </ejb-jar>
Partition router object (<Enterprise beanName>_PartitionKey class)
The application programmer is responsible for creating a partition router that acts as a callback for WPF. WPF uses this callback to determine the target partition for requests. The class, which is a Java™ object (POJO), must follow these rules:
- It must reside in the same package as the enterprise bean it supports
- The class name must be the same as the enterprise bean and have the string _PartitionKey appended to the name
- There must be a static method for each remote method on the enterprise bean. These methods should match the signature of each method on the enterprise bean but should always return a string representing the enterprise bean's partition name. The partitioning facility calls these methods when a remote method is called on the enterprise bean.
- The method should not throw any checked exceptions.
- The customer must run wpfstubutil on the deployed ear with the partition router object to partitioning facility-enable for partition routing.
Parent topic:
Partitioned EJB overview
Related concepts