No really. Weld stores the bindings also in context data but the API is using a direct reference to a stored set.
Going via getContextData() is much easier though for code that has to support both Weld and OWB.
Yep, standardizing the key is the only viable solution without interceptors spec change. However, it's not typesafe, easy-to-use, etc.
And this is obviously wrong. Recently, we've reviewed a Narayana PR which is about to fix this problem:
https://github.com/jbosstm/narayana/pull/1211
I personally think that JTA TCK is missing some essential tests here.
I don't think this is an InterceptionFactory-specific problem. It's a general issue. It should work the same if you use an extension to add an interceptor binding.
Kind regards,
Arjan Tijms
Is there a standard way to get the bindings? Perhaps getting
hold of the Bean<T> that represents the current Interceptor?
You can inject a bean with scope @Dependent, qualifier @Default and
type Interceptor into any interceptor instance. However, this will
not help for @Nonbinding value members of an interceptor binding.
Kind regards,
Arjan Tijms
_______________________________________________ cdi-dev@lists.jboss.org <mailto:cdi-dev@lists.jboss.or
cdi-dev mailing listg >
https://lists.jboss.org/mailman/listinfo/cdi-dev
<https://lists.jboss.org/mailman/listinfo/cdi-dev >
Note that for all code provided on this list, the provider
licenses the code under the Apache License, Version 2
(http://www.apache.org/licenses/LICENSE-2.0.html
<http://www.apache.org/licenses/LICENSE-2.0.html >). For all
other ideas provided on this list, the provider waives all
patent and other intellectual property rights inherent in such
information.
-- Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic
--
Martin Kouba
Senior Software Engineer
Red Hat, Czech Republic