Suppose I have EJB A and I define an <ejb-local-ref> to EJB B. If B is in a different jar, the appropriate entry is added to the Environment Naming Context (ENC) for A, e.g., "env/ejb/BLocal". You can see it in jmx-console and succesfully fetch local home interfaces by looking up "java:comp/env/ejb/BLocal".
However, if B is in the same jar as A, the <ejb-local-ref> tag results in no entry in the ENC and lookups fail with the usual "NameNotFoundException". I've also defined the jboss.xml for each case correctly (I think).
Questions: 1) Is this a bug or a "feature" (i.e., I should be instantiating B differently when it's in the same jar.)? 2) The entries in the ENC are created from the definitions in the <ejb-*-ref> tags, right?