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

Greg Wilkins commented on OWB-1293:
-----------------------------------

To paraphrase the two approaches again:

+ option A.  Jetty provides a Decoration mechanism that does not have hard 
dependencies on any exposed Jetty APIs.  This is not a CDI specific mechanism.  
CDI implementations continue to have jetty integration modules which use this 
mechanism.      The future path for this would be for the servlet spec to be 
augmented with it's own standard decoration mechanism, so ultimately all CDI 
implementations would have a single servlet integration module (plus perhaps 
legacy ones for older versions).

+ option B.  Jetty provides a specific CDI decorator that uses the standard 
CDI.current() based APIs.   Jetty maintains the CdiDecorator (including 
handling any future javax->jakarta renaming that may happen).   The CDI 
implementations themselves do not need a jetty integration module, but they 
would still need code changes to know not to apply they legacy jetty 
integration (nor any other integration).    The future path for this is unclear 
as it is not likely that such a decorator could be mandated by the servlet 
specification.  Perhaps other containers would take up this approach as a 
defacto standard?  But it is likely to remain a jetty specific mechanism.

 

While option B may initially feel more like a step in the right direction, I 
don't see a good  future path that could require all containers to maintain 
their own integration with CDI.current()

I think the future path for Option A is at least plausible and much more likely 
approach to be able to achieve saner/simpler CDI-container integration.  It's 
also simpler and less fragile code for today (eg if there is any javax 
renaming, it can be done entirely in CDI impl without coordinated jetty release)

 

 

> 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