Posted By:
Richard_Seppala
Posted On:
Monday, March 27, 2006 03:21 PM
I am planning a RMI server object that inherits from UnicastRemoteObject. The remote interface under planning is such that I want the server to be able to identify the client which is calling a method. I understand the RMI is asynchronous system and therefore I cannot, say, create a thread per client which serves that client only in which case it would be simple to store the "session data" locally in the object running in that thread. I thougth that maybe each client should create Artificial And Unique identifier and then define everyone of the remote methods so that they take in the ID as a parameter. But creating such ID is not so simple given that the uniqueness bust be guaranteed. And this solution seems v
More>>
I am planning a RMI server object that inherits from UnicastRemoteObject. The remote interface under planning is such that I want the server to be able to identify the client which is calling a method.
I understand the RMI is asynchronous system and therefore I cannot, say, create a thread per client which serves that client only in which case it would be simple to store the "session data" locally in the object running in that thread.
I thougth that maybe each client should create Artificial And Unique identifier and then define everyone of the remote methods so that they take in the ID as a parameter. But creating such ID is not so simple given that the uniqueness bust be guaranteed. And this solution seems very artificial. I think there must be a better one I just don't know about. Do you have suggestions?
<<Less