General discussion

Locked

Distinguishing between several client se

By philippe_vh2 ·
I have an RMI server to which several client sessions (running on one PC client) connect. To perform the record locking on the server I would like to obtain a unique handle to the client. Is there a way to do this? (getClientHost() returns the IPaddress but does not distinguish between the running instances when they run on one PC).
The program uses an object that has collections with lock and unlock possibilities.
Example :
- lock("MASTER", 12) will lock the 12th master object
- unlock("MASTER", 12) will unlock the 12th master object
- unlock("ALL") will unlock all objects locked by that client (should be JVM)
The program has been running well for some time while no two concurrent connections existed from the same client (using the IP address obtained by getClientHost()). The situation changed and now several clients are running on the same machine. I would prefer not to change the interface definitions or the client program.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Distinguishing between several client se

by petroff In reply to Distinguishing between se ...

Without having to modify the client or the interface this task is getting harder.
The clean solution is to have a session object, and store in it an unic session id.
This session object could be created after successfull logon for example.

Collapse -

Distinguishing between several client se

by philippe_vh2 In reply to Distinguishing between se ...

The question was auto-closed by TechRepublic

Collapse -

Distinguishing between several client se

by James_Randy In reply to Distinguishing between se ...

The first answer looks good to me. If that doesn't work, try something else. Hope this helps.

Collapse -

Distinguishing between several client se

by philippe_vh2 In reply to Distinguishing between se ...

The question was auto-closed by TechRepublic

Collapse -

Distinguishing between several client se

by philippe_vh2 In reply to Distinguishing between se ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums