• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Session Bean Stateful life cycle

 
Ranch Hand
Posts: 241
  • 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
 
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
 
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: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hummm ... I see . It realy makes sense.

Thx for the help

regards
 
This will take every ounce of my mental strength! All for a 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
    Bookmark Topic Watch Topic
  • New Topic