Bugs item #790843, was opened at 2003-08-18 15:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=790843&group_id=22866

Category: JBossMX
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Stefan Reich (sreich)
Assigned to: Nobody/Anonymous (nobody)
Summary: JMX/jndi scoping problem for beans with same jndiName

Initial Comment:
SUN's petstore components have a couple of beans that 
appear in several archives, and that have the same 
jndiName. Although perfectly legal, it causes a problem 
when the JMX core registers the beans because of the 
naming scheme it uses. Each bean is registered like this in 
the jboss.j2ee name space:
jboss.j2ee:jndiName=local/ContactInfoEJB,service=EJB

Because the record doesn't include the module name, a 
naming conflict occurs, and result in the deletion and 
recreation of the bean, but with a different classloader. This 
finally leads to ClassCastExceptions in arbitrary locations of 
the application.

The test case is SUNs PetStore 1.3.1_02 on top of MySQL, 
which is most likely to large to attach. I can send it via 
email, if necessary.


Errors at deploy time look like this:
12:59:12,996 ERROR [EjbModule] Initialization failed
javax.management.InstanceAlreadyExistsException: 
jboss.j2ee:jndiName=local/ContactInfoEJB,service=EJB 
already registered.
        at 
org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicM
BeanRegistry.java:617)
        at 
org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBe
an(BasicMBeanRegistry.java:198)
        at 
sun.reflect.GeneratedMethodAccessor2.invoke(Unknown 
Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegating
MethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(Ref
lectedMBeanDispatcher.java:284)
        at 
org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(
ObjectReferenceInterceptor.java:59)
        at 
org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(M
BeanAttributeInterceptor.java:43)
        at 
org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(Pers
istenceInterceptor2.java:93)
        at 
org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java
:76)
......

Or

12:59:13,731 DEBUG [EJBModuleFactory] Created module: 
jboss.management.local:
J2EEApplication=supplier.ear,J2EEServer=Local,j2eeType=EJB
Module,name=supplierpo-ejb.jar
12:59:13,732 DEBUG [EJBModuleFactory] 
javax.management.InstanceNotFoundException: jboss.j2ee:
jndiName=local/SupplierOrderEJB,service=EJB is not 
registered.
        at 
org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicM
BeanRegistry.java:354)
        at 
org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanSe
rverImpl.java:446)
        at 
org.jboss.management.j2ee.factory.EJBModuleFactory.create
EJB(EJBModuleFactory.java:102)
        at 
org.jboss.management.j2ee.factory.EJBModuleFactory.create(
EJBModuleFactory.java:65)
        at 
org.jboss.management.j2ee.LocalJBossServerDomain.handle
Notification(LocalJBossServerDomain.java:383)
        at 
org.jboss.mx.server.NotificationListenerProxy.handleNotificati
on(NotificationListenerProxy.java:71)
        at 
javax.management.NotificationBroadcasterSupport.sendNotifi
cation(NotificationBroadcasterSupport.java:95)
        at 
org.jboss.deployment.SubDeployerSupport.start(SubDeployer
Support.java:178)
        at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:
558)
        at 
org.jboss.deployment.MainDeployer.start(MainDeployer.java:
824)
        at 
org.jboss.deployment.MainDeployer.start(MainDeployer.java:
816)
        at 
org.jboss.deployment.MainDeployer.deploy(MainDeployer.jav
a:632)
        at 
org.jboss.deployment.MainDeployer.deploy(MainDeployer.jav
a:605)
        at 
sun.reflect.GeneratedMethodAccessor23.invoke(Unknown 
Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegating
MethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(Ref
lectedMBeanDispatcher.java:284)
        at 
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerI
mpl.java:550)
        at 
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java
:177)
        at $Proxy7.deploy(Unknown Source)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=790843&group_id=22866


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to