[jboss-jira] [JBoss JIRA] Commented: (EJBTHREE-909) Injection of Simple Environment Entries Using Resource Annotation without name
Dmitri Voronov (JIRA)
jira-events at lists.jboss.org
Sat Mar 27 17:21:37 EDT 2010
[ https://jira.jboss.org/jira/browse/EJBTHREE-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12522398#action_12522398 ]
Dmitri Voronov commented on EJBTHREE-909:
-----------------------------------------
Are there any plans regarding this bug? It actually violates JEE compliancy.
> Injection of Simple Environment Entries Using Resource Annotation without name
> ------------------------------------------------------------------------------
>
> Key: EJBTHREE-909
> URL: https://jira.jboss.org/jira/browse/EJBTHREE-909
> Project: EJB 3.0
> Issue Type: Bug
> Affects Versions: EJB 3.0 RC9 - Patch 1
> Reporter: Roland Räz
>
> The name of the @Resource annotations should default to the property or method name. The following simple environment injections are not working as expected:
> @Resource
> String stringValue;
> Long longValue = Long.valueOf(1);
> @Resource
> void setLongValue(Long longValue) {
> this.longValue = longValue;
> }
> Workaround:
> @Resource(name = "stringValue")
> String stringValue = "hi";
> Long longValue = Long.valueOf(1);
> @Resource(name = "longValue")
> public void setIntValue(Long longValue) {
> this.longValue = longValue;
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list