• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI server questions

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Does server need functionality of Data class like (create, delete operation...).... My server provides only "book" and "strictSearch" methods (as needed to GUI client)....When I search this forum, I found that some people creates DBRemote inteface, that extend Remote, DB... (maybe it need for fat clients??) I'm little bit confused.....Is this ok to implement server with only business methods......

2) Can i use this interface both for local and network mode:


public interface BusinessService {
void bookRoom(int recNo, String owner) throws NoRoomFoundException, RemoteException;
Map<Integer, Room> strictSearch(String[] criteria) throws RemoteException;
}




and


ServiceLocal have implementation of BusinessService's methods, and ignoring RemoteException. ServiceRemote is adapter to ServerLocal (delegate own methods to ServiceLocal methods)....

Or this ugly decision?


 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1/ You can use a fat client or a thin client. With the 1st one you will expose methods from the given interface to the client; with the other one you will only have 2 methods (find and book). Both approaches are acceptable. A nice discussion about this topic can be found here.

2/ an interface implementing another interface Are you sure you passed the scjp certification? But I just used the BusinessService for both local and remote implementations, other people used your approach, with either one you can pass this certification.
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, Eduard!

Here, you can find a proposal of a thin client. Although I implemented a thick client, if it was today, I would definitely implement a thin client, because I think it eases the solution. If your lock() method does not return any value, then implementing a thick client is a little bit harder.
 
Eduard Mamedov
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for replies! As always, very usefull advices
...
Roel, it was misprint
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic