Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fix order of matching rules

...

DataSource references in your ejb should get automatically mapped to the Resource you declare. The shortest and easiest rule is that if your reference name matches a Resource in your openejb.xml, that's the one you get.  Essentially, the rules for mapping are as follows.

  1. Injected Name Attribute Match - variable @Resource with a name attribute matching the resource name gets that resource injected
  2. Injected Name Attribute Match - @Resource with a variable name attribute matching the resource name gets that resource injected
  3. No Match - nothing matches a resource name, so the first resource available gets injected

...