• Post Reply Bookmark Topic Watch Topic
  • New Topic

PreDestroy is not called during passivation and timeout

 
Himai Minh
Ranch Hand
Posts: 1400
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p.38 of Frits' notes,

3.13 PreDestroy not called:
1. a crash of the EJB container
2. a system exception thrown from the instance's method to the container


Also, according to Ethuware,
If a (stateful) bean is passivated and if the timeout (@StatefulTimeout) occurs , the container does not call the PreDestroy method.

This point has been shown on p.21 of Frits notes.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Posts: 2788
177
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On p.38 of Frits' notes,

That is the PreDestroy in the context of a MessageDriven bean.

On p.17 (and in the graph on p.21) you will find the following summary for Session Beans:
2.1.9 Predestroy not called
1. A crash of the EJB container.
2. A system exception thrown from the instance’s method to the container.
3. A timeout of client inactivity while the instance is in the passive state. (Stateful SB only)
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!