IntelliJ Java IDE
The moose likes Distributed Java and the fly likes Remote object life time? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Remote object life time?" Watch "Remote object life time?" New topic
Author

Remote object life time?

J Hartley
Ranch Hand

Joined: Mar 29, 2001
Posts: 52
Hi, please help me in my understanding....
(assume Unicastremoteobject)
I have an RMI server that creates an instance of object X and then registers X with the registry.
Client A binds to this object X
Client B binds(rebinds?) to this object X
Both clients are very happy and call methods of object X
The server is still running(how? its went out of its main() didnt it???) .if the server dies so does the object instance X right?
Both clients exit. And implicity no longer reference the instance.
Now, the big question!, because no clients reference X, does it get garbage collected???. if not, does this this mean that if the server that created X is running than it will not get garbage collected.
if it does get garbage collected, what if client C come along and class bind ro rebind?...well x doesnt exist!, what happens then?
All help much appreciated!!!
Joe
 
 
subject: Remote object life time?
 
Threads others viewed
NX: RMI implemention question
RMI object life time???
RMI Server becoming unreferenced
Thread Doubt
Client Side Garbage Collection !
developer file tools