• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Session Bean Stateful life cycle

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

Thx for the help

regards
 
reply
    Bookmark Topic Watch Topic
  • New Topic