[ 
https://issues.apache.org/jira/browse/CXF-8130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16959362#comment-16959362
 ] 

Andriy Redko commented on CXF-8130:
-----------------------------------

Hi [~rom16rus] , np at all, I think I understood the problem, I was able to 
reproduce it and observe the impact, indeed CXF is quite affected. I will try 
to come up with the fix on CXF side, we may need to take the reflection path 
unfortunately, but let me see if the other way(s) are possible. Thank you.

> 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
>            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)

Reply via email to