Program guide > (deprecated) Partitioning facility > Partitioning facility programming > Partitioning facility framework programming model
Deprecated feature: The partitioning facility (WPF) feature is deprecated. You can configure partitioning with WebSphere eXtreme Scale.
Modify the enterprise bean stubs
The normal Enterprise JavaBeans (EJB) deployment process produces cluster-enabled stubs. These stubs can be modified with a second pass to be partition routable. The tool that is provided takes the EAR file and produces a new EAR file with the newly modified stubs. The stubs are modified for all the partition routable enterprise beans. A partition routable enterprise bean is a stateless session bean with a remote interface and an associated XXX_PartitionKey router class.
The wpfStubUtil tool is located in the <WAS_install_root>/bin directory. Run this tool for partitioned EAR files after ejbdeploy is run. The usage for wpfStubUtil follows. The tool can fail if the order is not preserved:
wpfStubUtil -ear <earname> -jar <jarname> -class <class_name> -temp < temp working directory> [optional flags: -stubUpdateClasspath <classpath > -verbose -stubDebug -keep -rmicextclasspath <classpath> -extdirs <javac extdirs>]The -ear, -jar, -class, and -temp are all required. The -stubUpdateClasspath command is optional, but if it is used it must be the first argument after the temp working directory.
An explanation of each option:
The wpfStubUtil can update any session enterprise beans with XXX_PartitionKey class defined. These Session enterprise beans can be either partition routable session bean (PRSB) or partitioned stateless session bean (PSSB).
- -ear <ear name>
- The ear containing the partitioned application.
- -jar <jar name>
- The enterprise bean jar within the ear that contains the partitioned enterprise bean.
- -class <class name>
- The remote interface class of the bean.
- -temp <temp working directory>
- The directory where all the work takes place.
- -stubUpdateClasspath <class path>
- (optional) The tool will append its classpath with what the user passes.
- -verbose
- (optional) Verbose option for the tool output.
- -stubDebug
- (optional) Puts extra debugging output in the stub. This option should not be used in a production environment.
- -keep
- (optional) Does not delete the contents of the temporary working directory after tool is finished.
- -rmicextclasspath <classpath>
- (optional) Appends what the user passes in to the rmic classpath.
- -extdirs <javac extdirs>
- (optional) Appends what the user passes in to the javac extdirs.
An example of running wpfStubUtil for an ear containing a façade PRSB bean:
C:\stub>\ws\Application server\bin\wpfStubUtil.cmd -ear D_WPFFacadePartitionSample.ear -jar WPFKeyBasedPartitionEJB.jar -class com/ibm/websphere/wpf/ejb/ WPFKeyBasedPartition.class -temp \working A subdirectory or file \working already exists. WPFC0069I: Unpacking ear file D_WPFFacadePartitionSample.ear WPFC0070I: Unpacking jar file WPFKeyBasedPartitionEJB.jar WPFC0071I: Running rmic to generate stub source [rmic output - removed] [done in 2334 ms] WPFC0072I: Updating stub source WPFC0073I: Compiling modified stub source WPFC0074I: Rejaring jar file WPFKeyBasedPartitionEJB.jar WPFC0075I: Rejaring ear file D_WPFFacadePartitionSample.ear Cleaning up
An example of running wpfStubUtil for two ears containing partitioned routable session beans. Notice the D_StockAccount.ear requires an extra jar file (StockEJB.jar) to be appended to the rmic classpath (-rmicextclasspath), stubUpdateClasspath (-stubUpdateClasspath), and javac ext dirs (-extdirs):
C:\stub>\ws\Application server\bin\wpfStubUtil.cmd -ear D_Stock.ear -jar StockEJB.jar -class wpf/test/stock/ejb/ProcessStock.class -temp \working A subdirectory or file \working already exists. WPFC0069I: Unpacking ear file D_Stock.ear WPFC0070I: Unpacking jar file StockEJB.jar WPFC0071I: Running rmic to generate stub source [rmic output - removed] [done in 2324 ms] WPFC0072I: Updating stub source WPFC0073I: Compiling modified stub source WPFC0074I: Rejaring jar file StockEJB.jar WPFC0075I: Rejaring ear file D_Stock.ear Cleaning up C:\stub>\ws\Application server\bin\wpfStubUtil.cmd -ear D_StockAccount.ear -jar StockAccountEJB.jar -class wpf/test/stockaccount/ejb/ Process.class -temp \working -stubUpdateClasspath \stub\StockEJB.jar -rmiextclasspath \stub\ StockEJB.jar -extdirs \stub\StockEJB.jar A subdirectory or file \working already exists. WPFC0069I: Unpacking ear file D_StockAccount.ear WPFC0070I: Unpacking jar file StockAccountEJB.jar WPFC0071I: Running rmic to generate stub source [rmic output - removed] [done in 2333 ms] WPFC0072I: Updating stub source WPFC0073I: Compiling modified stub source WPFC0074I: Rejaring jar file StockAccountEJB.jar WPFC0075I: Rejaring ear file D_StockAccount.ear Cleaning up
An example of running wpfStubUtil for an ear containing only a partitioned stateless session bean:
C:\stub>\ws\Application server\bin\wpfStubUtil.cmd -ear D_WPFKeyBasedPartitionSample.ear -jar WPFKeyBasedPartitionEJB.jar -class com/ibm/websphere/wpf/ejb/ WPFKeyBasedPartition.class -temp \working A subdirectory or file \working already exists. WPFC0069I: Unpacking ear file D_WPFKeyBasedPartitionSample.ear WPFC0070I: Unpacking jar file WPFKeyBasedPartitionEJB.jar WPFC0071I: Running rmic to generate stub source [rmic output - removed] [done in 2373 ms] WPFC0072I: Updating stub source WPFC0073I: Compiling modified stub source WPFC0074I: Rejaring jar file WPFKeyBasedPartitionEJB.jar WPFC0075I: Rejaring ear file D_WPFKeyBasedPartitionSample.ear Cleaning up
There are some instances where the wpfStubUtil cannot find a class even though it is located in a jar that is specified in the classpath. In these cases, unjar all of the classes from the jar containing the class it cannot find in the -temp <temp working directory>.
Parent topic:
Partitioning facility framework programming model
Related concepts
Partitioning facility framework programming model