serverObject = ictx.lookup(RMIServerRPC.RPC_JNDI_NAME);
} catch (NamingException ne) {
throw new IllegalStateException(ne);
}
// Get a connection to the RPC server
RMIServerRPC server = (RMIServerRPC) PortableRemoteObject.narrow(serverObject, RMIServerRPC.class);
// Send Request and get the answer
try {
return server.getEJBResponse(request);
} catch (RemoteException re) {
throw new RuntimeException("Error while handling answer on the remote side ", re);
}
}