[
https://issues.jboss.org/browse/WFLY-2368?page=com.atlassian.jira.plugin....
]
Stuart Douglas commented on WFLY-2368:
--------------------------------------
I think this should be resolved, can you re-test against upstream?
env-entry is not injected with @Resource annotation into CDI beans
and JAX-RS resources
---------------------------------------------------------------------------------------
Key: WFLY-2368
URL:
https://issues.jboss.org/browse/WFLY-2368
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: CDI / Weld, REST
Affects Versions: 8.0.0.Beta1
Reporter: Dmytro Zemnytskiy
Assignee: Stuart Douglas
I built simple web application to narrow down problem, consisting of war packaged in ear.
It attempts to inject env-entry declared in web.xml using @Resource annotation into
servlet, jax-rs resource and cdi managed bean.
For now only servlet is injected with env-entry properly. JAX-RS resource requires
@ManagedBean annotation in order to work, but still does not work if it is listed
explicitly in its Application, rather than autoscanned. CDI bean does not work yet. Same
app without modifications work properly in Jboss AS 7.1
Below is example of CDI bean :
@Named
public class EnvEntryProducer {
@Resource(name="demo") String env;
@PostConstruct void logMe() {
System.out.print("Env: " + env);
}
@Produces @Named("enventry") String getEnv() {
return env;
}
}
PostConstruct is not called yet as well
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira