• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI - packages...

 
Kaspar Dahlqvist
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two days ago, when I first set out to do my first RMI example, I had perfectly blondish hair. Yesterday I started to get some grey hair and as of this hour I AM COMPLETELY BALD....!!!
I might be off track here, and my hopes are that someone will correct me and make me realise my stupidity... I have three files in one package (dev):

My problem is this: if I have this in package dev, it works like a charm! But RMI is about to have a service on one computer and a client program on another, so I figure that it should be possible to split these files up in some way so that the client and the server are separated. I JUST CAN'T MAKE IT WORK!!! I have tried:
Putting DataInterface and Server (plus Server_Stub and Server_Skel) in one package Serv.
Putting Datainterface and Client in another package Clie.
This makes Client go mad, since the object received is of type Server_Stub, and Server_Stub implements Serv.DataInterface...

If someone could take the time to enlighten me, I would be glad...
Thanks!
/Kaspar
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kaspar -
Here's a tutorial I started back in January that walks through the problem you're dealing with. I thought you might like to see what's involved in getting this to work right (it's nontrivial). Hint: successful RMI lives in proper deployment as much as it does in correct source.
[ May 22, 2002: Message edited by: Michael Ernest ]
 
Kaspar Dahlqvist
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks, Mike!!!
Actually, I had browsed this awesome tutorial of yours before, but missed a crucial point. The service should be defined in a separate package. Trivial when you think of it, but then again, most things are when you know them...
Thanks again!
/Kaspar
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that one person has said they solved a problem using it, I'm happy for the time spent.
Even though I teach a lot, it's still easy to forget that explaining how to do something technical and detailed is WAY harder than doing it yourself. That tutorial was not easy to write.
Thank you thank you thank you for using it.
 
mk singh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
to run the rmi server and rmiclient in different system , 1 you required the rmi stb in client machine with the remote interface . then you modify the client code , in client code you mention the ip address of the server machine where u are going to run the rimi server code in the naming lookup method like ("rmi//ip/ remote object name)
i hope this one is suppose to work
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!