Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please explain...  RSS feed

 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"A session object handle can be held beyond the life of a client process by serializing the handle to a persistent store. When the handle is later deserialized, the session object it returns will work as long as the session object still exists on the server."
What does it mean by "as long as the session object still exists on the server", 'coz from what I understand, after passivation the bean instance is evicted from memory.
 
Simon Brown
sharp shooter, and author
Ranch Hand
Posts: 1913
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's right. When beans are passivated they are removed from the server. However, when that bean is re-requested, the passivated "instance" is reloaded. If the server is restarted - that's a different story and you won't be able to get the instance pointed to by the handle.
Simon
 
Rahul JG
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But then how does it differ from the case where the client executes a method on a bean instance which is passivated. Even there the passivated state is reloaded into a new instance.
What's so special about the bean handle then?
 
Mathews P Srampikal
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to passivate a bean during transaction???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!