| 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: 4389
|
|
|
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
Ranch Hand
Joined: Sep 13, 2007
Posts: 1259
|
|
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
|
 |
 |
|
|
subject: Data class also to be used for RMI calls?
|
|
|