Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clean client connection removal

 
Liviu Carausu
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I wondered if it is necessary an explicit client connections removal..
Is it UnicastRemoteObject.unexportObject() method call necessary for every
object that represents a client connection and that is exported by server ?

Or the objects are garbage collected automatically by Java when there are no references from the client ?

Thanks,
Liviu
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Liviu

I use this feature to disconnect my remote clients and I am not shore that the is really necessary but I don't know an other way to make a remote object unable to process remote requests.
The reason is that the client my still reamin active but its link with net is gone. If you see the Client like a GUI I then you can presume that after you close the GUI the garbage collector resolve the client related resources. But the client is more than UI, the UI use some client mechanisms.

What I try to say here is that the client needs an explicit log of feature and this feature can be triggered by the UI - but it is not necessary.

Consider the follow scenario, you can add a control layer which follows thee clients if a client does something wrong then it close its connection - but it still keep the client running.

Regards M
[ March 29, 2007: Message edited by: Mihai Radulescu ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic