Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2510

Enable @PreDestroy for SY managed CDI Beans (Bean-Service, Transformer, Validator)

    Details

      Description

      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).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                igarashitm tomohisa igarashi
                Reporter:
                igarashitm tomohisa igarashi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: