The interceptor methods that are used for the life cycle callback events (AroundConstruct, PostConstruct, and PreDestroy) follow the same model for implementing the interceptors as previously described in regards to location. This may be defined in the target class, in interceptor classes, or in both classes. In this chapter, we will only see examples of PostConstruct and PreDestroy callback events.
As described in the previous table containing the interceptor annotations, a method with the @PostConstruct annotation is used to intercept the PostConstruct life cycle event, and a method with a @PreDestroy annotation is used to intercept the PreDestroy life cycle event. Intercepting classes have the same ...