We help IT Professionals succeed at work.

How can i kill the RMI Client.

fenil
fenil asked
on
If i have a client object reference, how do i disconnect or kill client using RMI. Is there any methods available???
Comment
Watch Question

Commented:
Hi,


I think that your client object must expose some method to clean up all its resources and then call System.exit(..); to shutdown the JVM its running on, that's assuming that your client object should have that kind of authority.


Doron

Author

Commented:
I do not want the client to exit completely. I only want the connection between client and server to get disconnected.
Commented:
Hi,


From what you say I understand the following:

1. Client establishes RMI connection with Server.
2. Server gets the Client reference.
3. Server decides to disconnect the Client.
4. Server makes Client lose its RMI connection.

If all of the above is true then you still have to design the client with an exposed API that will at least clean up the data member holding the Server object remote reference. In RMI the only way (as far as I remember) to disconnect a client from the server object, is to set the remote reference (in the client) to null and let the GC do its work.


Doron

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for doronb

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer