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

Proxies for HAServiceMBeanSupport subclass unbound across cluster when any instance undeployed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBossAS-4.0.3 Final, JBossAS-4.0.3 SP1, JBossAS-4.0.4.CR2
    • Fix Version/s: JBossAS-4.0.5.CR1
    • Component/s: Clustering
    • Labels:
      None
    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      1) If you want to access your HA service via a proxy, don't have your service subclass HAServiceMBeanSupport.
      2) If you need to subclass HAServiceMBeanSupport, override public void sendNotification(Notification notification) so that lifecycle notifications are not transmitted around the cluster, but only forwarded locally.

      Show
      1) If you want to access your HA service via a proxy, don't have your service subclass HAServiceMBeanSupport. 2) If you need to subclass HAServiceMBeanSupport, override public void sendNotification(Notification notification) so that lifecycle notifications are not transmitted around the cluster, but only forwarded locally.
    • Estimated Difficulty:
      High

      Description

      ProxyFactoryHA registers a JMX notification listener for the shutdown of its target service and removes the proxy from JNDI on receipt of the notification. HAServiceMBeanSupport broadcasts its JMX notifications across the cluster. The effect of this is that the ProxyFactoryHA on all cluster nodes will receive the notification when any one instance of the service undeploys. The effect is all proxies across the cluster are removed from JNDI.

      Test org.jboss.test.cluster.jmx.test.HAInvokerUnitTestCase demonstrates this.

      Following is a deliberately created stacktrace showing the origin of a notification that caused an invalid removal from JNDI:

      2006-05-08 01:51:53,703 DEBUG [org.jboss.proxy.generic.ProxyFactoryHA] About to stop: disabling remote access to mbean jboss.test:service=HAService
      2006-05-08 01:51:53,703 DEBUG [org.jboss.proxy.generic.ProxyFactoryHA] java.lang.Exception: stacktrace
      java.lang.Exception: stacktrace
      at org.jboss.proxy.generic.ProxyFactoryHA.containerIsAboutToStop(ProxyFactoryHA.java:169)
      at org.jboss.proxy.generic.ProxyFactoryHA$StateChangeListener.handleNotification(ProxyFactoryHA.java:231)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
      at $Proxy10.handleNotification(Unknown Source)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
      at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:110)
      at org.jboss.ha.jmx.HAServiceMBeanSupport._receiveRemoteNotification(HAServiceMBeanSupport.java:393)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
      at org.jboss.ha.framework.server.HAPartitionImpl.handle(HAPartitionImpl.java:1017)
      at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:597)
      at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:497)
      at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:320)
      at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:725)
      at org.jgroups.JChannel.up(JChannel.java:1041)
      at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:377)
      at org.jgroups.stack.ProtocolStack.receiveUpEvent(ProtocolStack.java:393)
      at org.jgroups.stack.Protocol.passUp(Protocol.java:538)
      at org.jgroups.protocols.pbcast.STATE_TRANSFER.up(STATE_TRANSFER.java:141)
      at org.jgroups.stack.UpHandler.run(Protocol.java:60)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  brian.stansberry Brian Stansberry
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: