Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-909

Injection of Simple Environment Entries Using Resource Annotation without name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • depchain-1.0.0-alpha-43
    • EJB 3.0 RC9 - Patch 1
    • None
    • None

    Description

      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;
      }

      Attachments

        Activity

          People

            jaikiran Jaikiran Pai (Inactive)
            wv-javacoder Roland Räz (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: