Details
-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
8.0.0.Beta1
-
None
-
Medium
Description
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