[
https://issues.jboss.org/browse/WFLY-11817?page=com.atlassian.jira.plugin...
]
Paul Ferraro commented on WFLY-11817:
-------------------------------------
[~manovotn] A simple modification to this test will reproduce the problem:
https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basi...
Adding a CDI annotation anywhere within:
https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basi...
will cause CDI to resolve the @Resource annotations instead of the ee subsystem. This
causes the test to fail with an NPE.
For reference, the deployment processor for @Resource annotations in the ee subsystem is
here:
https://github.com/wildfly/wildfly/blob/master/ee/src/main/java/org/jboss...
specifically, the resolution for @Resource(lookup="...") is handled by:
https://github.com/wildfly/wildfly/blob/master/ee/src/main/java/org/jboss...
The binding service to which I was referring (as used by LookupInjectionSource) is here:
https://github.com/wildfly/wildfly/blob/master/naming/src/main/java/org/j...
CDI @Resource(lookup=...) processing does not start corresponding
binding service
---------------------------------------------------------------------------------
Key: WFLY-11817
URL:
https://issues.jboss.org/browse/WFLY-11817
Project: WildFly
Issue Type: Bug
Components: CDI / Weld
Affects Versions: 16.0.0.Final
Reporter: Paul Ferraro
Assignee: Matej Novotny
Priority: Major
If the corresponding binding service (the service responsible for creating the jndi
binding) is not ACTIVE (e.g. clustering binding services are always PASSIVE) or, due to a
race condition, has not yet started completely, a null value will be returned.
The ee subsystem processes @Resource(lookup=...) correctly by establishing a dependency
on the corresponding binder service.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)