Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Develop partitioning facility applications with WSAD v5.1 > Use WSAD 5.1 with a new partitioned application
Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.
Create a partition stateless session bean
Before you begin
The partition stateless session bean (PSSB) is the central element of a partitioning facility application. It allows the application server to query the application at startup to determine which partitions the application requires. It is also used by the application server to inform the application when a partition is activated or deactivated. Activated means the HA manager has assigned a partition to this cluster member (See the section on HA manager policies to see how the HA manager assigns partitions to a cluster member).
About this taskFor this activity we will add a PSSB to the enterprise bean module created in the previous section.
- In WSAD v5.1, right click on the enterprise bean project and click New. This brings up the New window that allows you to make an Enterprise bean.
- Click EJB in the left frame of the window and then click on Enterprise Bean on the right. Click on Next.
- Select the EJB module to host the PSSB and click Next. The module selected should already be the correct one since that is what you clicked on to get to these dialogs.
- Create the session bean. When completed, click Next.
- Select session bean in the radio check boxes.
- Provide a bean name.
- Provide a path source folder information.
- Provide default packaging information.
- Define the local interface and local home interface for the PSSB.
- Click on the Class... button beside the local home interface.
- Scroll down and select the PartitionHandlerLocalHome interface. You can see the package name com.ibm.websphere.wpf from the wpf.jar file we added to the build path previously. This dialog only shows interfaces that are usable as local home interfaces.
- Click OK.
- Click on the Class... button beside the local interface.
- Scroll down and select the PartitionHandlerLocalHome interface.
- Click OK.
- Click on Finish. The PSSB is now created and included in the enterprise bean module. Next, we need to add the methods from the PartitionHandler to the implementation bean for the enterprise bean. There is no built-in mechanism for doing this , but there is a trick we can use to get WSAD to add the methods very .
- Find the bean you just added in the project and double click on pssb_name (whatever you called the PSSB).
- Change the pssb_name to also implement the PartitionHandlerLocal interface and click Save.
- Right click on the class name in the outline and generate the missing methods on the interfaces, by selecting Source > Override / Implement methods.
- In the resulting Override / Implement methods window, deselect the checkbox for the EJBLocalObject and click OK. This adds the methods from the local interface in one easy step.
- Remove the PartitionHandlerLocal interface from the pssb_name and click Save.
ResultsYour PSSB is now ready for customization.
Parent topic:Use WSAD 5.1 with a new partitioned application
Use WSAD 5.1 with a new partitioned application