//Create an exporter instance
int listenPort = config.getIntConfigVal("com.sun.jini.test.spec.jeri"
+ ".basicjeriexporter.listenPort", 9090);
BasicJeriExporter exporter = new BasicJeriExporter(
TcpServerEndpoint.getInstance(listenPort), new BJETestILFactory());
BJETestServiceImpl service = new BJETestServiceImpl();
try {
//Export a remote object using the exporter constructed in step 1
BJETestService stub = (BJETestService)
exporter.export(service);
} catch (ExportException e) {
log.fine("Exception thrown after first call to export: "
+ e.getMessage());
throw new TestException(
"Unexpected Exception after first call to export",e);
}
BJETestServiceImpl service2 = new BJETestServiceImpl();
try {
//Export another remote object using the same exporter that
//was used in step 2
BJETestService stub =
(BJETestService) exporter.export(service2);