• Post Reply Bookmark Topic Watch Topic
  • New Topic

passivate and activate is must for statefullsession bean  RSS feed

 
Sanju
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
For statefull session bean Passivation and activationis must? I will agree this one. but we are calling just empty method, what is the use ? if we are not calling these 2 methods and passing the parameters in create method what will happen ?

Sanju
 
Gabriel Buheler
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not too clear your question.

Anyway, what I understood is that ejbPassivate and ejbActivate are callbacks from the container. The client do not call them.

Call parameters in the create? activate? passivate? they are not related. When a client call create for a statefull bean, passivate and activate are not called in that precise moment.

Hope this make a little clear!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The question might be this ... If you call methods that do not preserve any state, why bother with passivate and activate? The better question might be why do you have methods like that on a stateFUL bean? It sounds like they belong on stateLESS bean. Can you split your curren bean into two?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!