Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7584

JSR-77 Handling of Naming service broken

XMLWordPrintable

      The POJO-ization of Naming and the move from conf/jboss-service.xml has broken the JSR-77 handling of Naming.

      First, the Naming beans are getting started before the jsr-77 deployer, resulting in nothing happening.

      Moving RemoteNamingBean to deploy/ (JBAS-7580) will fix that problem. But then we get a different problem:

      15:53:08,079 DEBUG [ServiceController] Registering service jboss:service=Naming
      15:53:08,081 DEBUG [ServiceControllerRegistrationLifecycleCallback] Registered MBean jboss:service=Naming
      15:53:08,081 DEBUG [ServiceController] Creating service jboss:service=Naming
      15:53:08,081 DEBUG [LocalJBossServerDomain] handleNotification: javax.management.Notification[source=jboss.system:service=ServiceController][type=org.jboss.system.ServiceMBean.create][message=]
      15:53:08,087 DEBUG [JNDIResource] Service name: jboss:service=Naming
      15:53:08,089 DEBUG [JNDIResource] postRegister(), parent: jboss.management.local:j2eeType=J2EEServer,name=Local
      15:53:08,089 DEBUG [JNDIResource] postRegister() caught this exception: javax.management.RuntimeOperationsException
      at org.jboss.mx.server.MBeanServerImpl.addNotificationListener(MBeanServerImpl.java:748)
      at org.jboss.management.j2ee.JNDIResource.postCreation(JNDIResource.java:178)
      at org.jboss.management.j2ee.J2EEManagedObject.postRegister(J2EEManagedObject.java:314)
      at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
      at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
      .....
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
      at org.jboss.management.j2ee.JNDIResource.create(JNDIResource.java:59)
      at org.jboss.management.j2ee.factory.JNDIResourceFactory.create(JNDIResourceFactory.java:48)
      at org.jboss.management.j2ee.deployers.LocalJBossServerDomain.handleNotification(LocalJBossServerDomain.java:266)
      at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
      at $Proxy63.handleNotification(Unknown Source)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
      at org.jboss.system.ServiceController.sendControllerNotification(ServiceController.java:688)
      at org.jboss.system.microcontainer.CreateDestroyLifecycleAction.installAction(CreateDestroyLifecycleAction.java:48)
      .....
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:671)
      at org.jboss.system.ServiceController.create(ServiceController.java:405)
      at org.jboss.system.ServiceController.create(ServiceController.java:370)
      at org.jboss.system.microcontainer.jmx.ServiceControllerCreateDestroyLifecycleCallback.install(ServiceControllerCreateDestroyLifecycleCallback.java:44)
      .....
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: The MBean jboss:service=Naming exists but does not implement the NotificationBroadcaster interface.
      ... 101 more

      The above is because the object registered under jboss:service=Naming is now org.jnp.server.Main instead of org.jboss.naming.NamingService. The Main class is not a NotificationBroadcaster.

      An instance of org.jboss.naming.NamingService is still registered in JMX, now under ObjectName jboss:service=NamingBeanImpl. Changing the jsr-77 LocalJBossServerDomain bean's JNDIService property to use jboss:service=NamingBeanImpl resolves the above problem. But it's not really correct; the role now being played by org.jboss.naming.NamingService is not what it was in AS 5; it's just there to allow Naming invocations via the detached invokers. Tracking it via JSR-77 isn't correct. The org.jnp.server.Main object is what should be tracked.

              dandread1@redhat.com Dimitrios Andreadis
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: