[ https://issues.apache.org/jira/browse/CXF-8130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andriy Redko reassigned CXF-8130: --------------------------------- Assignee: Andriy Redko > Since Spring 5.1.5 Release CXFServlet application listener dissapears by > context refresh > ---------------------------------------------------------------------------------------- > > Key: CXF-8130 > URL: https://issues.apache.org/jira/browse/CXF-8130 > Project: CXF > Issue Type: Bug > Components: Transports > Affects Versions: 3.3.2, 3.3.3 > Reporter: Roman Platonov > Assignee: Andriy Redko > Priority: Major > > Hi, > I have following problem after the changes in Spring Framework [commit > there|#L606]] > So, at the start of the application startup there is a call of > {{prepareRefresh()}}, so it works like that: > > {code:java} > this.earlyApplicationListeners = new > LinkedHashSet<>(this.applicationListeners); > {code} > > and this collection is empty. > Then is CXFServlet I have addition of listener - [Cxf > link|https://github.com/apache/cxf/blob/ec4423437bd7d6b63e3464761394cfafb50cacfa/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java#L90] > > Then it's needed to refresh the Application Context, so it provokes the > {{refresh()}} at AbstractApplicationContext, then goes to {{prepareRefresh}} > and then checks > {code:java} > this.earlyApplicationListeners == null,{code} > but it's an empty LinkedHashSet, not null, so then it comes to > {code:java} > this.applicationListeners.clear(); {code} > > 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! -- This message was sent by Atlassian Jira (v8.3.4#803005)