RMI Testing with JRMP

The main difference between testing RMI with JRMP and testing RMI over IIOP is that with JRMP you need to connect to an RMI registry.

To test RMI with JRMP:

  1. In the Workflow bar, click Start Here. The Load File Wizard opens.
  2. Alternative: In the Classes pane, right-click Remote Objects and choose New RMI to start the RMI Wizard directly. In this approach, skip the next two steps.
  3. Click the RMI option button.
  4. Click Next. The Rmi Wizard dialog box opens.
  5. In the Host/Port text boxes, type the name and port of the host. For example, type localhost and 1099.
  6. Click Add archive(s) to classpath and specify the location of the RMI interfaces for the client. For example, <public user documents>\Silk Performer 21.0\SampleApps\Java\Lib\sampleRmi.jar.
  7. Back on the EJB Wizard, click Next to view all registered remote objects in the RMI registry. The Look up and narrow a Remote Object dialog box displays all registered remote objects in the RMI registry.
  8. Choose RemoteServer and click Next. The methods of the remote object are browsed.
  9. Select the first two methods by checking the appropriate check boxes.
    • echoFloat(float)
    • echoString(string)

    The selected methods are implemented by the sample RMI server. The other methods are inherited from base classes and don't need to be tested.

  10. Click Next and select the test case from which the methods should be called.