wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI server questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI server questions" Watch "RMI server questions" New topic
Author

RMI server questions

Eduard Mamedov
Greenhorn

Joined: May 20, 2010
Posts: 23
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?



SCJP 6
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5139
    
  12

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.


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

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.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Eduard Mamedov
Greenhorn

Joined: May 20, 2010
Posts: 23
Thanks for replies! As always, very usefull advices
...
Roel, it was misprint
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI server questions
 
Similar Threads
Findings on implementing Local and Remote (RMI) interfaces
Business Service
RMI method invocation return value
I'm ready to submit my assignment. RMI question?
My design...getting cloudier