Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Questions

 
Ehsan Rahman
Ranch Hand
Posts: 59
Chrome Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How ya’all high-ridin’ cow boys & girls doing?

What design pattern (or simple solution) can allow business method interface (book, unbook, create, etc) to be implemented by both the concrete RMI interface (which needs to throw the RemoteException) and a concrete non-RMI (i.e. none-networked mode) class? I feel like I’m missing a solution here in terms of redefining the methods. Your kind guidance please

My lock interface methods (B&S) don’t require any cookies to be used. I’m pretty tempted to expose the business methods via RMI and allow threads to deal with each business method accordingly from the client. Some people have the view this is against the intent of the assignment. Just out of curiosity, why is this so? In industry is it frowned upon to use RMI in this way?
 
K. Tsang
Bartender
Posts: 3348
12
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, I suggest you take a look at the RMI tutorial.

For your achitecture design, the RMI server uses a "remote" interface where you define the methods for clients to use. Similarly the local version that implements Sun's provided interface should contain the same methods. Then you need some interface on top of that that covers both remote and local interfaces.
 
Roel De Nijs
Sheriff
Posts: 9818
101
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ehsan,

Regarding your question about RMI take a look at this thread. It certainly will be helpful.

Some people have the view this is against the intent of the assignment. Just out of curiosity, why is this so?

You can find an interesting (and very long) discussion here.

Kind regards,
Roel
 
Ehsan Rahman
Ranch Hand
Posts: 59
Chrome Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you both, and thanks for the links, definitely helpful.

Time to experiment on the GUI. Have a good day

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic