File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Data class also to be used for RMI calls? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Data class also to be used for RMI calls?" Watch "Data class also to be used for RMI calls?" New topic
Author

Data class also to be used for RMI calls?

Robin van Riel
Greenhorn

Joined: May 04, 2012
Posts: 20

Still not finished, since documenting leads to refactoring .

I always presumed the Data class should be used as an entry point for accessing the DB file data both explicitly (reading/writing the DB file) and implicitly (RMI calls).
However, after rereading the instructions, I've come to doubt this, especially since some DBMain methods mention file operations (e.g.: "Reads a record from the file").
It would make my life slightly easier if I didn't have to use the Data class as an entry point for executing the RMI calls.

Any thoughts on this matter?

Thanks in advance!
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5201
    
  12

My Data class was used to interact with the database file. I had a BusinessService which was exposed through RMI (and used the Data class to do the necessary file access).


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Robin van Riel
Greenhorn

Joined: May 04, 2012
Posts: 20

Thanks Roel,

This means I can get rid of some unnecessary compexity.

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2362
    
    7

I used my Data class to access the DB file too.

Like Roel said, the RMI has a set of (remote) service methods. For me this remote service thing delegate to the (local) service methods (where you use your Data class).


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data class also to be used for RMI calls?