I am only wondering about having Data class implement the DataAccess interface. Is this necessary? (Don't take this as this being the wrong way to do it, it might not be.
I can see what you are getting at here, however, I believe that you will find only one needed. I know one is an interface and one is a class, but there is an easier solution here, along witht eh DataAccess interface.
ConnectionManager/Factory is the way you want to go.
I was unsure of this myself so I made the following change.
DataAccessRemote - R.I.P. Is no more.
DataFactory - Now returns a RemoteDataInterface instead.
which also contains a vector of all the records it(client) has locked
a) is This design correct ?
b) should RemoteDataAccess (interface) extends Remote or java.rmi.server.RemoteObject or PortableRemoteObject?
c) is it ok to use locking at 2 places, one at Data.java and other at RemoteDataAccess which stores what all records it has locked.
d) can RemoteDataAccess and RemoteDataAccessImpl be merged ? I mean do i really need interface RemoteDataAccess.
How can i use Hashmap? i think Hashset can be used at this place.
Do i need to call rmic on RemoteDataAccess also ?
I think it will be better to call unexport(obj)
UnicastRemoteObject.exportObject(this);
SCJP, SCJD.
SCJP, SCJD.
what i wanted to know is that here in the client package there is a class called DataClient, as per the sun's requirement we have to have a dataclient that should implement all the public methods of data class.
which is not there here.
is that okay.
public interface RemoteDataAccess extends Remote, DataAccess
{
// no method inside it
}
Can the methods in DataInterface or DataAccess talked above throw RemoteException, DatabaseException?
Why do we need DataAccessLocal? I think we can use
Data class to replace it. Is it possible?
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|