[jboss-jira] [JBoss JIRA] Created: (EJBTHREE-909) Injection of Simple Environment Entries Using Resource Annotation without name

Roland R?z (JIRA) jira-events at lists.jboss.org
Fri Mar 9 03:04:28 EST 2007


Injection of Simple Environment Entries Using Resource Annotation without name
------------------------------------------------------------------------------

                 Key: EJBTHREE-909
                 URL: http://jira.jboss.com/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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list