• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

process of different EJB's Passivation and Activation

 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Could anyone discribe the different process of Passivation/Activation of: 1) stateful session bean; 2) CMP, and 3) BMP entity beans ?
At each case what is required from the client to perform or the client even do not know all what happened ?
I am not clear these process.
Thanks
Ruilin
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yang,
ejbActivate() and ejbPassivate() works differently for Entity Bean and Session Bean. If you see this link they have criticized EJB Spec http://www.onjava.com/pub/a/onjava/2001/02/28/ejb.html

For CMP and BMP :- ejbActivate() - When the bean instance is assigned to EJB Object (From Pooled State to Ready State). Once assigned to EJB Object ejbActivate() method is called.
ejbPassivate() - When the bean instance is dissociated with from EJB Object. After this the bean goes to Pooled State (From Ready State to Pooled State)
Stateful Session Bean - When the bean instance is not serving methods from client. To conserve resources the container can passivate bean by calling ejbPassivate(). When the client call a method on EJBObject then the ejbActivate() is called.
I hope I have explained
Thanks
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suresh,
Thanks,
This means ejbPassivate method has to be called by the container before an entity-bean disassociate with the EJBObject. Client is completely unaware of this process.
Thanks again
Ruilin
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Anyone can give me a clarification:
When a bean is passivated its state is serialized to disk ? Is it correct ? How to understand this ?
Please give comments
Thanks,
Ruilin
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic