[
https://issues.apache.org/jira/browse/OWB-1293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16894216#comment-16894216
]
Greg Wilkins commented on OWB-1293:
-----------------------------------
I have updated [https://github.com/eclipse/jetty.project/pull/3838] and
[https://github.com/weld/core/pull/1926] to support all 3 integrations: legacy
with exposed APIs, DecoratingListener and CdiDecorator. The CDITest
integration tests in jetty test all 3 for Weld using a SNAPSHOT build of 1926.
I just need to get the same thing working for OWB and we can release.... oh
just reading the comments now.... so destroy in CdiDecorator is completely
wrong! Ugh I have to keep the creationcontext around so I can release it?
Really not liking this option, as it smells of a memory leak to have to have a
map of objects/classes in the server space to creationcontexts... I don't even
know if the objects created are safe to use as map keys?
If the CdiDecorator has to be stateful ie remember class->creationcontext or
instance->creationcontext, then I think that is the death of option B. Such
maps will just hold webapp classloaders in memory and will leak. Perhaps weak
references etc. can help, but that can be fragile. If the CDI SPI gave me
simple inject and destroy methods I could call without needing to be stateful,
then I'd be OK with it. But I'm thinking the SPI is just not simple enough to
be used in this way. Tell me I'm wrong.... else I'll revert in the next
few days to just the decorating approach. This is now getting critical path
for us to get our next release(s) out.
> 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)