Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-977

Servlet AsyncListener PreDestroy method not called

XMLWordPrintable

      The PostConstruct method of an AsyncListener is called, but the PreDestroy method is not called.

      For example, the listener is created and registered as follows:

      AsyncContext ac = request.startAsync();
           
      ac.addListener(ac.createListener(MyAsyncListener.class));
      

      AsyncListener is considered a web event listener and Java EE component, and its PreDestroy method should be called when the current request terminates.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              cfang@redhat.com Cheng Fang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: