• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Bean Stateful life cycle

 
Eusebio Floriano
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends

I have a doubt.

If a session bean stateful is passivate and the client calls remove(),
what�s the container�s callback ?
Will it call ejbActivate then ejbRemove or it will call ejbRemove directly ?

Regards
 
Christian D. Th. Sellberg
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that when the client calls remove then it triggers the container to call ejbActivate and then ejbRemove.
If you look at the life cycle state diagram of a statefull session bean on page 77 in the spec then there is no transition from �passive� to �does not exist� which is triggered by remove(). I also make sense if you imagine passivation as if the bean were serialized, then there would be no active bean instance to call ejbRemove on.



Christian
 
Sandesh Tathare
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christian,

You are right. when client calls remove, it triggers container to call ejbActivate and ejbRemove methods. If the bean were serialized, then there would be no active bean instance to call ejbRemove on.
 
Eusebio Floriano
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hummm ... I see . It realy makes sense.

Thx for the help

regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic