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

Missing <env-entry> more easily matched

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.0-beta-1
    • deployment
    • 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

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

            Dates

              Created:
              Updated: