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

Injection of Simple Environment Entries Using Resource Annotation without name

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EJB 3.0 RC9 - Patch 1
    • Fix Version/s: depchain-1.0.0-alpha-43
    • Component/s: None
    • Labels:
      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;
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jaikiran jaikiran pai
                Reporter:
                wv-javacoder Roland Räz
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: