This content has been marked as final.
Show 3 replies
-
1. Re: Unique JNDI Names
starksm64 Jun 19, 2009 1:58 AM (in response to alrubinger)Yes, the ejb-name has always only been required to be unique within a jar.
-
2. Re: Unique JNDI Names
jaikiran Jun 19, 2009 3:21 AM (in response to alrubinger)"ALRubinger" wrote:
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"ALRubinger" wrote:
@see https://jira.jboss.org/jira/browse/JBPAPP-2124
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.
at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
Caused by:
java.lang.IllegalStateException: refspath.ear-EJB-metrics-instance is already installed.
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:716)
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:121)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:51)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
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:jboss.deployment:id="refspath.ear-EJB-metrics-instance",type=Component
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). -
3. Re: Unique JNDI Names
wolfc Jun 19, 2009 4:04 AM (in response to alrubinger)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).