To test the
Silk Performer RMI sample:
-
Launch the
Product Manager RMI sample.
-
Navigate to the
<public user documents>\Silk Performer
21.0\SampleApps\RMILdap directory.
-
Invoke the four batch files
step1 through
step4.
-
In the
Classes pane, right-click
Remote Objects and choose
New EJB.
The
EJB Wizard opens. The RMI objects are registered at a JNDI naming service.
-
Type
com.sun.jndi.cosnaming.CNCtxFactory into the
Factory text box.
-
Type
iiop://localhost:1900 into the
Provider Url text box.
-
Click
Edit Classpath ... and select
<public user documents>\Silk Performer
21.0\SampleApps\RMILdap\RMILdap\ProductManager-server\ProductManager-server.jar.
-
Back on the
EJB Wizard, click
Next to connect to the naming service.
The
Look up and narrow a Home Interface or Remote Object dialog box opens.
-
Select the
ProductManagerServicesLdap remote object.
The
RmiExtension helper class performs all necessary bootstrapping.
-
Click the
RmiExtension helper class in the
Classes pane of the
Loaded Components page.
-
Click the
createObject method of the class in the
Input Data pane.
The method includes a class to provide the parameters for the RMI connection settings.
-
View the result of the
createObject method in the
Objects pane.
The result is a stub class instance, which is used to communicate with the remote object on the server.
-
Open the
getProductsByName method in the
Loaded Components page.
The method requires a string as parameter. You can use
* as a wildcard to get all products.