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 Enterprise Archive (EAR) file and produces a new EAR with the newly modified stubs. The stubs are modified for all the partition routable EJBs. A partition routable enterprise bean is a stateless session bean with a remote interface and an associated XXX_PartitionKey router class.
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.
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
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
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>.