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

Andriy Redko commented on CXF-7276:
-----------------------------------

Thanks a lot for the comment, [~ay]. Indeed, this approach we have tried first, 
I was trying to (re)initialize the `asyncSupport` part of the framework later, 
when the `ServletConfig` becomes available. Unfortunately, the 
`JSR356AsyncSupport` initialization code is relying on AtmospshereConfig and, 
by chaining, on `ServletConfig` instance the framework was initialized. Run 
into hard blockers here and we decided to go with delayed framework 
(re)initialization based on `ServletConfig` availability. Thanks!

Best Regards,
    Andriy Redko

> Atmosphere init code should be moved out of AtmosphereWebSocketServlet 
> Destination
> ----------------------------------------------------------------------------------
>
>                 Key: CXF-7276
>                 URL: https://issues.apache.org/jira/browse/CXF-7276
>             Project: CXF
>          Issue Type: Improvement
>          Components: Transports
>            Reporter: Sergey Beryozkin
>            Assignee: Andriy Redko
>
> Unfortunately, moving Atmosphere initialization code out of the 
> AtmosphereWebSocketServletDestination may not be possible at the moment. As 
> we have discovered, Atmosphere has following constraints:
>   - needs ServletConfig to initialize properly (and leverage f.e. JSR-356 
> support)
>   - the ServetConfig instance is not available yet at the moment when 
> Destination / DestinationRegistry are being created / initialized
> In order to somehow workaround that, the suggestion is to introduce interface 
> `ServletConfigAware` so `AtmosphereWebSocketServletDestination` will 
> implement it. In turn, `CXFNonSpringServlet` is going to notify all 
> interested destination when the instance of `ServletConfig` becomes 
> available. At this time, we are able to (re)initialize the 
> `AtmosphereFramework` with JSR-356 support if available. With that, CXF 
> WebSocket transport could be run on Tomcat 8+ natively.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to