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

Since Spring 5.1.5 Release CXFServlet application listener dissapears by context refresh

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.2, 3.3.3
    • Fix Version/s: 3.3.5, 3.4.0
    • Component/s: Transports
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hi,

      I have following problem after the changes in Spring Framework commit there]

      So, at the start of the application startup there is a call of prepareRefresh(), so it works like that:

       

      this.earlyApplicationListeners = new LinkedHashSet<>(this.applicationListeners);
      

       

      and this collection is empty.

      Then is CXFServlet I have addition of listener - Cxf link

       

      Then it's needed to refresh the Application Context, so it provokes the refresh() at AbstractApplicationContext, then goes to prepareRefresh and then checks

      this.earlyApplicationListeners == null,

      but it's an empty LinkedHashSet, not null, so then it comes to

      this.applicationListeners.clear(); 

       

      and it removes the listener from CXFServlet, so there is no event coming to CXFServlet.

      Is there any solution? Maybe it's better to change the logic of addition the listener to context?

       

      I have also add the comment to spring framework issue ([Issue|https://github.com/spring-projects/spring-framework/issues/22325])

       

      Thank you!

        Attachments

          Activity

            People

            • Assignee:
              reta Andriy Redko
              Reporter:
              rom16rus Roman Platonov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: