Entering content frame

Procedure documentation Generating Stubs and Skeletons Locate the document in its SAP Library structure

Use

Use the SAP RMIC tool distributed with the SAP J2EE Engine to generate stubs and skeletons that support RMI-P4 remote object communication. You use the tool to generate them against the implementation class of the remote interface.

You need this tool if you have chosen not to use dynamic stubs and skeletons for your remote objects. For more information about the types of RMI-P4 stubs and skeletons, refer to Remote Objects Communication in RMI-P4.

Procedure

To start the SAP RMIC tool, you must run the rmic script file located in the deploying subdirectory of your SAP J2EE Engine installation directory.

To generate stubs and skeletons for the AccountImpl implementation class, proceed as follows:

...

       1.      Choose RMI_P4 Support to show that you are generating RMI-P4 stubs and skeletons.

       2.      In the Additional Classpath field, specify the path to any JAR files or directories containing class files that must be added to the classpath. Using this option you do not have to set the path to the remote objects you generate stubs against in advance. You can use the PathChooser pane on the right-hand side of the screen to browse to the corresponding directories. You add them to the Additional Classpath field by choosing <<.

       3.      In the Class Name field, specify the fully qualified class name of the implementation class against which stubs and skeletons are generated. As with the AccountImpl class, the value of the field must be examples.rmi_p4.AccountImpl.

       4.      Depending on your application and your development environment, you can choose the following additional options of the SAP RMIC tool:

                            a.      Specify the path to the directory where you want the generated Java files to be stored in the Generator Directory field. The path must be absolute. Use the PathChooser pane on the right-hand side of the screen to browse to the corresponding directoriy. You add it to the Generator Directory field by choosing <<.

Note

If you do not specify anything in this field, the generated files are placed in the directory where the SAP RMIC tool resides.

                            b.      Specify the path to the directory where you want the generated Java class files to be stored in the Compiler Directory field. The path must be absolute. Use the PathChooser pane on the right-hand side of the screen to browse to the corresponding directoriy. You add it to the Compiler Directory field by choosing <<.

Note

If you do not specify anything in this field, the generated files are placed in the directory where the SAP RMIC tool resides.

                            c.      Choose the Use RMI-P4 Security if you want the generated skeleton to have additional security functions. This type of skeleton checks whether the client requesting the remote method is authorized to execute this method. If it is not authorized, no access to the remote method is granted by the system.

                            d.      Choose the Apply Execution Context if you want additional information about the application to be stored in the ThreadContext when calling remote methods from an application.

                            e.      If you do not want the tool to delete files with .java extensions after it generates the stubs and skeletons, choose Keep Java Files.

       5.      Choose Generate to generate the stubs and skeletons. They must be packaged together with the remote interfaces and their implementation classes so that you can deploy them on the SAP J2EE Engine.

 

Leaving content frame