Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3356

Fix PostConstruct & PreDestroy implementation for JAXWS endpoints & handlers

XMLWordPrintable

      JSR 316: JavaEE Platform Specification
      Section 5.2.5: Annotations and Deployment Descriptors

      In some cases a class may need to perform initialization of its own after all
      resources have been injected. To support this case, one method of the class may be
      annotated with the PostConstruct annotation (or, equivalently, specified using
      the post-construct entry of a deployment descriptor). This method will be called
      after all injections have occured and before the class is put into service. This
      method will be called even if the class doesn't request any resources to be
      injected. Similarly, for classes whose lifecycle is managed by the container, the
      PreDestroy annotation (or, equivalently, the pre-destroy entry of a deployment
      descriptor) may be applied to one method that will be called when the class is
      taken out of service and will no longer be used by the container. Each class in a
      class hierarchy may have PostConstruct and PreDestroy methods. The order in
      which the methods are called matches the order of the class hierarchy with
      methods on a superclass being called before methods on a subclass.

              ropalka Richard Opalka
              ropalka Richard Opalka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: