• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S: RMI interface

 
Oliver Weikopf
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disclaimer: I'm new to RMI and have never had to deal with it before, so what I'm doing may be complete nonsense.

My question is: Is it ok to simply use the given interface DBMain as the RMI Interface? DBMain would have to extend Remote to do that, and I'm not sure whether I'm allowed to add something like that to DBMain.
Has anyone else done this, or did everybody write an additional interface?
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12014
220
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Oliver,

It would not be enough to change the interface to extend Remote - you would also have to change the method signatures. If you change the method signatures, then any other programs that are currently be written to access your Data class will not work.

So basically - dont do it. Create your own Adapater or Wrapper interfaces and classes to keep it within the requirements.

Regards, Andrew
 
Oliver Weikopf
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, I had come to the same conclusion by now. Thanks, Andrew!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic