in Technology by (1.9m points)

What are the callback annotations for stateful bean?

1 Answer

0 votes
by (1.9m points)

Following is the list of callback annotations for stateful bean:

  • @PostConstruct - method is invoked when a bean is created for the first time.

  • @PreDestroy - method is invoked when a bean is removed from the bean pool or is destroyed.

  • @PostActivate - method is invoked when a bean is loaded to be used.

  • @PrePassivate - method is invoked when a bean is put back to bean pool.

...