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

Romain Manni-Bucau edited comment on OWB-1293 at 7/31/19 9:03 AM:
------------------------------------------------------------------

Hi [~gr...@webtide.com], this is because CDI is started through 
WebBeansConfigurationListener and CdiDecorator injects listeners before. So 
long story short, the webapp works but listeners were initialized before cdi 
listener starts so all listeners don't benefit from CdiDecorator. Making 
listener instantiated/decorated lazily works fine. Here is a trivial patch to 
make it passing 
[https://gist.github.com/rmannibucau/e3ab5f0958396c64891c8712ddb0b3dd] (but 
please take care to the comments, don't think it is the impl to commit).

 

Edit: a hacky solution is to start in a servlet container initializer and stop 
in a listener but you just move the issue to the initializers i guess


was (Author: romain.manni-bucau):
Hi [~gr...@webtide.com], this is because CDI is started through 
WebBeansConfigurationListener and CdiDecorator injects listeners before. So 
long story short, the webapp works but listeners were initialized before cdi 
listener starts so all listeners don't benefit from CdiDecorator. Making 
listener instantiated/decorated lazily works fine. Here is a trivial patch to 
make it passing 
[https://gist.github.com/rmannibucau/e3ab5f0958396c64891c8712ddb0b3dd] (but 
please take care to the comments, don't think it is the impl to commit).

> Update Jetty integration prior to Jetty-10 release
> --------------------------------------------------
>
>                 Key: OWB-1293
>                 URL: https://issues.apache.org/jira/browse/OWB-1293
>             Project: OpenWebBeans
>          Issue Type: Improvement
>          Components: Interceptor and Decorators
>            Reporter: Greg Wilkins
>            Priority: Major
>
> The current jetty integration relies on exposing private jetty APIs so a 
> jetty Decorator can be registered.   This is fragile and requires different 
> APIs for the upcoming jetty-10 release.
> Instead, Jetty is developing a mechanism where a object with a decorator 
> signature can be set as a context attribute and it will be introspected and 
> dynamically registered as a decorator without any API dependencies.
> This is currently being developed in 
> [https://github.com/eclipse/jetty.project/pull/3838] and an integration with 
> Weld is at [https://github.com/weld/core/pull/1926] 
> Feedback is sought from the OpenWebBeans team on the approach and then we'd 
> like to collaborate to make a similar integration.
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to