Two Laptop Bag
The moose likes EJB and other Java EE Technologies and the fly likes passivate and activate is must for statefullsession bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "passivate and activate is must for statefullsession bean" Watch "passivate and activate is must for statefullsession bean" New topic
Author

passivate and activate is must for statefullsession bean

Sanju
Ranch Hand

Joined: Jul 15, 2002
Posts: 53
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


Thank you,<br />Sanju
Gabriel Buheler
Ranch Hand

Joined: Apr 21, 2004
Posts: 39
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

Joined: Jan 29, 2003
Posts: 8791
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?


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: passivate and activate is must for statefullsession bean
 
Similar Threads
remote interface
passivate and activate is must for statefullsession bean
Stateless beans and SessionSynchronization
Question about remove() method of the Session bean
Session Beans method to be called from session bean