• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

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
 
Did you miss me? Did you miss this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic