Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3429

ServerImpl should shutdown Destination before setMessageObserver=null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10
    • 2.4, 2.3.4
    • Core
    • None

    Description

      Hi,

      During shutdown the CXF server, we encounter the NullPointerException from time to time.
      The issue is that ServerImpl will set MessageObserver to null, and then it shutdown desination. however, if the server is multi-thread and probably some thread is runing, then it can result in NullPointerException because MessageObserver is null.

      Can we fix this bug by shutdown the Destination first and then set MessageObserver to null?

      Also, do we have a workaround for this issue?

      public class ServerImpl implements Server {
      public void stop() {
          LOG.fine("Server is stopping.");
          ...
          getDestination().setMessageObserver(null);
          getDestination().shutdown();
      }
      

      David

      Attachments

        Activity

          People

            njiang Willem Jiang
            veaven David Liu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: