• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Life Cycle Method True / False

 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
True / False

The life-cycle method PostConstruct, PreDestroy, PostActivation and PrePassivation are called only once for a Stateful Session Bean.

Please suggest
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I think that the PostActivation and PrePassivation can occur more than once, if you deal with an application server.

regards,
Mihai
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mihai
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to be more clear, the PostConstruct and PreDestroy are called per "instance" of the stateful session bean.
 
Krzysztof Koziol
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right.
Moreover the PrePassivation method is called each time when a statefull bean instance is passivated (serialized to temporary storage) and the PostActivate is called when the bean is activated (deserialized to bean instance).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic