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);
} catch (IllegalStateException e) {
//OK
} catch (ExportException e) {
log.fine("Unexpected exception thrown after second call to export: "