The current resolution behavior is overwriting this as this was the only value for the resolved name at the time. A resolvedJndiName has since been added to the base ResourceInjectionMetaData, and this is what should be set and used.
I've switched the overwrites to instead write the resolved link target to "ref.setResolvedJndiName(target);".
...which will invalidate Bill's change within EJB3, so I reverted that.
On local beans, the link target is resolved to the pattern:
"local/" + ejbName + '@' + System.identityHashCode(ejbName);
...in JBossEnterpriseBeanMetaData.determineLocalJndiName(). Not sure if this is desired.
That form of local jndi name would only be created if not explicitly defined in the metadata. This should be fine as there is no standard for a local jndi name binding or expectation that it has a global jndi binding.