The quick fix is indeed possible, but then you would create a version of Weld that would only work on jetty >=10
From the comments on linked discussion I understood that org.eclipse.jetty.util.Decorator exists in both, 9.4 and 10. So it would actually work for both versions (unless you plan to completely remove that on 10). Nevertheless, I am not against a better solution I was just making sure we are on the same line about what the problem and possible solutions are.
Our current idea is that the decorators would be linked in using either reflection or method handles.
I see what you mean. I am not sure that's any more solid then having a proper, albeit proprietary, API. After all, there is a custom integration layer already existing for various servlets (jetty && tomcat for instance) so changing existing API into this new contract doesn't really make it anyhow more universal/portable. Should this contract change, it would break the implementation all the same but in a somewhat subtler manner. Or maybe I am just missing something?
Ideally in future there could be a standard java.inject.Injector interface...
You can try and raise that but as it stands, CDI spec talks about EE and SE, not really about servlets, so any servlet integration is basically outside of spec boundaries. |