https://bugzilla.redhat.com/show_bug.cgi?id=1064990 This BZ reported @PreDestroy method on SY Service is never invoked unless you add @ApplicationScoped.
http://stackoverflow.com/questions/8420070/how-to-create-and-destroy-cdi-weld-managed-beans-via-the-beanmanager According to this discussion, The CDI Beans created through CreationalContext needs CreationalContext#release() to be invoked on it's destroy phase to get @PreDestroy invoked. Since Bean-Service and bean resolution version of Transformer/Validator are created through CreationalContext, we need to invoke CreationalContext#release() on destroy phase (i.e. undeployment).
|