Originally posted by Nate Johnson:
main
1) create a "local" database on the server (Data)
2) pass that ref to my RemoteDataFactory (constructor) so it can keep a copy when getConn is called on it (which it turn creates a new RemoteData based on that database)
3) bind that RemoteDataFactory to the registry
end main
So, now in the client, get a ref to RemoteDataFactory (from Naming) when a remote connection is requested and call getConn. This will return a RemoteData object that has all of the methods that can access that "local" Data that was created back on the server. Each client can do this when it starts in remote mode and then be talking to the same Data, but with a unique RemoteData (which in turn can be used as the id for locking).
I just want to know how to "creates a new RemoteData based on that database".
RemoteData can't get the ref of database(Data) from its constructor.
public RemoteData(Data data) can't work for Data can't be Serialized,then how can I use Data in the RemoteData?How can I pass the ref in the RemoteDataFactory to the RemoteData?