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.

  1. 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.

  2. Click EJB in the left frame of the window and then click on Enterprise Bean on the right. Click on Next.

  3. 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.

  4. Create the session bean. When completed, click Next.

    1. Select session bean in the radio check boxes.

    2. Provide a bean name.

    3. Provide a path source folder information.

    4. Provide default packaging information.

  5. Define the local interface and local home interface for the PSSB.

    1. Click on the Class... button beside the local home interface.

    2. 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.

    3. Click OK.

    4. Click on the Class... button beside the local interface.

    5. Scroll down and select the PartitionHandlerLocalHome interface.

    6. Click OK.

  6. 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 .

  7. Find the bean you just added in the project and double click on pssb_name (whatever you called the PSSB).

  8. Change the pssb_name to also implement the PartitionHandlerLocal interface and click Save.

  9. Right click on the class name in the outline and generate the missing methods on the interfaces, by selecting Source > Override / Implement methods.

  10. 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.

  11. 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


Related tasks

Use WSAD 5.1 with a new partitioned application


+

Search Tips   |   Advanced Search