• Post Reply Bookmark Topic Watch Topic
  • New Topic

Client Side Garbage Collection !

 
Manas Ahlaad
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

how client side stub get to know that its corresponding instance at server side is expired(thus garbage collected) for "it" (client side class) to get garbage collected. how does the communcation occur?
TIA
Manas
 
Manas Ahlaad
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
help me anyone !
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I *think* that in most cases, the client side stub isn't actually tied to a specific server side bean instance, but the container simply dispatches requests to bean instances in the pool that are in the appropriate state. In other words, the stub is just a proxy object and as such, there isn't really a corresponding serverside instance so the two can live independently, regardless of whether one is GC'd.
For example, with a SLSB, requests from your stub go to the container which in turn finds a SLSB to use. With SFSBs things are a little trickier in that you can set the timeouts for bean instances to expire. Here, although the serverside instance can timeout, I'm pretty sure that you will get an exception if you try to subsequently use it after it has expired.
Anybody else have any thoughts on this?
Simon
 
Manas Ahlaad
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brown, i agree to you . but if its not tied. how does the client side JVM get to know that stub is no more of use so that it can be GC'ed.
TIA
 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are missing the point if you are concerned about stub GCing. You should really ask this question in the RMI forum if you truly want an answer.
The stub is not an object which you instantiate; thus, you should not be concerned about its collection.
What is the nature of your concern with stub collection?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!