user manual

SilkPerformer Java Explorer User Guide 63
3 S
ETTING UP TESTS
Enterprise JavaBeans & RMI Over IIOP
Procedure To test SilkPerformer’s RMI sample:
1 Launch the Product Manager RMI sample (see “Java RMI Samples”).
2 Browse to the \SampleApps\RMILdap directory.
3 Invoke the four batch files (step1 through step4).
4 Launch the EJB Wizard as described in the previous section. The RMI
objects are registered at a JNDI naming service. Use the EJB Wizard to
browse for available Remote Objects.
5 Use the following field values to connect to the naming service:
- Provider Url: iiop://localhost:1900
- Factory: com.sun.jndi.cosnaming.CNCtxFactory
- Classpath: \SampleApps\RMILdap\ProductManager-
server\ProductManager-server.jar
6 On the Look up and narrow a Home Interface or Remote Object dialog
select the ProductManagerServicesLdap remote object. The
RmiExtension helper class performs all necessary bootstrapping.
You can then work with the remote object as illustrated by the following two
screengrabs.
The RmiExtension helper class has been added to the loaded components in the
Classes tab. Its static method createObject includes a class to provide the
parameters for the RMI connection settings.
The result of the createObject method is viewable in the Objects tab. The result
is a stub class instance, which is used to communicate with the remote object on
the server.