Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-1678

Missing <env-entry> more easily matched

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.0-beta-1
    • Component/s: deployment
    • Labels:
      None

      Description

      If the expected exact name is not found, a second attempt using the variable alone will be attempted.

      Given:

      singletonBean.getEnvEntry().add(new EnvEntry().name("one").type(String.class).value("hello"));
      singletonBean.getEnvEntry().add(new EnvEntry().name("two").type(String.class).value("false"));
      singletonBean.getEnvEntry().add(new EnvEntry().name(Blue.class.getName() + "/two").type(String.class).value("true"));

      And a class like so:

      public static class Blue

      { @Resource private String one; @Resource private String two; //... }

      The injected values will be:

      assertEquals("hello", blue.getOne());
      assertEquals("true", blue.getTwo());

        Attachments

          Activity

            People

            • Assignee:
              dblevins David Blevins
              Reporter:
              dblevins David Blevins
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: