[jboss-jira] [JBoss JIRA] (WFLY-2368) env-entry is not injected with @Resource annotation into CDI beans and JAX-RS resources

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Fri Nov 15 06:03:06 EST 2013


     [ https://issues.jboss.org/browse/WFLY-2368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas resolved WFLY-2368.
----------------------------------

    Resolution: Out of Date


This should be fixed now. Feel free to re-open if you have a failing test case.
                
> 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


More information about the jboss-jira mailing list