RMI with rmiregistry on remote host

R

Rob Dempster

I am trying to get RMI to work with the client, the server and the
rmiregistry running of disjoint hosts. It is intended that the
rmiregistry run on the host serving the dynamically downloadable
classes and stubs.

I have tried this:

String name = "Compute";
try {
registry =
LocateRegistry.getRegistry("host.holding.downloadables");
Compute engine = new ComputeEngine();
registry.rebind("compute", engine);
System.out.println("ComputeEngine bound");
} catch (Exception e) {
System.err.println("ComputeEngine exception: " +
e.getMessage());
e.printStackTrace();
}

but it complains about java.rmi.AccessException:
Registry.Registry.rebind disallowed;

Is what I am trying feasible or not.

Thanks,
Rob Dempster
 
M

Marek Lange

Rob said:
I am trying to get RMI to work with the client, the server and the
rmiregistry running of disjoint hosts. It is intended that the
rmiregistry run on the host serving the dynamically downloadable
classes and stubs.

I have tried this:

String name = "Compute";
try {
registry =
LocateRegistry.getRegistry("host.holding.downloadables");
Compute engine = new ComputeEngine();
registry.rebind("compute", engine);
System.out.println("ComputeEngine bound");
} catch (Exception e) {
System.err.println("ComputeEngine exception: " +
e.getMessage());
e.printStackTrace();
}

but it complains about java.rmi.AccessException:
Registry.Registry.rebind disallowed;

I believe the reason for this error is that you can only bind objects to
a local RMI registry.

-marek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top