You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2019/10/11 16:06:00 UTC

[jira] [Commented] (CXF-8130) Since Spring 5.1.5 Release CXFServlet application listener dissapears by context refresh

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

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

Hi [~rom16rus], could you please submit a test case or small sample project to reproduce and understand the issue? Clearly, as you pointed out, there is a change in Spring Framework. 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)