Yes, the ejb-name has always only been required to be unique within a jar.
Have we been wrong in this all along? Looks like non-unique EJB names are legal so long as they're in different JARs.
Yeah, although i did start a discussion about this a few months back in our user forum, i never pushed it to a logical end http://www.jboss.org/index.html?module=bb&op=viewtopic&t=143237
That exception shows:
16:22:33,539 WARN [AbstractDeploymentContext] Unable to register deployment mbean refspath.ear-EJB-metrics-instance
javax.management.InstanceAlreadyExistsException: jboss.deployment:id="refspath.ear-EJB-metrics-instance",type=Component already registered.
java.lang.IllegalStateException: refspath.ear-EJB-metrics-instance is already installed.
at <unknown class>.<unknown method>(Unknown Source)
... 26 more
16:22:34,265 WARN [HDScanner] Failed to process changes
which actually is a MC thing and our lack of understanding/control of what a component name's scope is http://www.jboss.org/index.html?module=bb&op=viewtopic&t=154305
And furthermore, the MBean that MC is trying to register:
is an debug level MBean which is now disabled by default in AS trunk https://jira.jboss.org/jira/browse/JBAS-6987. Probably we need to do this in EAP branch (and maybe AS 5_x branch) too?
However, the real solution for JNDI names would be to fix our default JNDI naming scheme (and still be backward compatible).
We've been here before http://www.jboss.org/index.html?module=bb&op=viewtopic&t=144173.
Proceed on EJBTHREE-1794 taking the new jndibinder component into account (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153079).