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/26 22:36:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
Andriy Redko resolved CXF-8130.
-------------------------------
Resolution: Fixed
> 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
> Fix For: 3.4.0, 3.3.5
>
>
> 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)