RMI> no skeleton?

N

Nancy.Nicole

I am trying to teach myself RMI for an internship I've got (I'm a
computer science student). I'm trying to compile sample code to see how
this works before I implement my own, but every time I try the rmic
ClassName.java I get the stub but no skeleton. Any suggestions?

Thanks!
Nancy
 
M

Matt Humphrey

I am trying to teach myself RMI for an internship I've got (I'm a
computer science student). I'm trying to compile sample code to see how
this works before I implement my own, but every time I try the rmic
ClassName.java I get the stub but no skeleton. Any suggestions?

Your book may be out of date. Skeleton classes are no longer needed and
rmic no longer produces them.

Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
N

Nancy.Nicole

Matt said:
Your book may be out of date. Skeleton classes are no longer needed and
rmic no longer produces them.

Matt Humphrey (e-mail address removed) http://www.iviz.com/

Hmm...well, it's not working properly. How do you call the handle? I
have

quoteServer = "rmi://localhost//Quotes";

Thanks.
 
M

Matt Humphrey

Hmm...well, it's not working properly. How do you call the handle? I
have

quoteServer = "rmi://localhost//Quotes";

I don't have a short example to share, but these are the essential
components:

1) I define my server as an interface, such as (in a project shared by the
client and server)

public interface IServer extends Remote {

2) I implement the server (in a separate project) as

public class RMIServer extends UnicastRemoteObject implements IJukebox

3) I run rmic on the server and place the generated classes with the client

4) When the server starts up it registers itself as

RMIServer server = new RMIServer();

LocateRegistry.createRegistry(5001);
Naming.rebind("//:5001/MyServer", server);

5) The client gets the remote object by

IServer myServer = (IServer) Naming.lookup("//serverHost:5001/MyServer");

This is a very simple technique but it allows the export of additional
remote objects as well as callbacks from the server to the client. I no
longer remeber where I got the design from, but I've been using it (with
alot of success) for quite a while.

Matt Humphrey (e-mail address removed) http://www.iviz.com/
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top