RMI garbage colection
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nuno_oliveira
Posted On:   Friday, January 3, 2003 12:50 PM

Consider the following setup: - two hosts A and B. - start the rmiregistry in host B in a command prompt. - in a diferent command prompt in this same host B, start a program that registers a remote server implementation reference in the above registry. - in host A, start a client that contacts the rmiregistry running in B to get a reference to the server object and waits for user input before exiting. - kill the VM in host B by closing the console window where you started the server (or using ctrl-c, whatever...). My understanding of RMI's distributed garbage colection tells me that if you leave the client on for enough time, RMI's automatic lease renewal should detect that the RMI-runtime on host B i   More>>

Consider the following setup:

- two hosts A and B.


- start the rmiregistry in host B in a command prompt.


- in a diferent command prompt in this same host B, start a program that registers a remote server implementation reference in the above registry.


- in host A, start a client that contacts the rmiregistry running in B to get a reference to the server object and waits for user input before exiting.


- kill the VM in host B by closing the console window where you started the server (or using ctrl-c, whatever...).



My understanding of RMI's distributed garbage colection tells me that if you leave the client on for enough time, RMI's automatic lease renewal should detect that the RMI-runtime on host B is down (since the VM has terminated) and throw an exception on the client side.
Is this true ? My tests say it isn't... maybe it's only a question of waiting a litle while ?




Thank you.    <<Less

Re: RMI garbage colection

Posted By:   Edward_Harned  
Posted On:   Friday, January 3, 2003 07:07 PM

Host B may be down because it is an Activatable Remote Object and its time has come to de-activate. Therefore, this is not an exception.


The client cannot know the reason for Host B not being alive and so it will never be an Exception.


It all comes down to what you want to do when the remote machine is no longer active.

About | Sitemap | Contact