Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-1152

SubscriptionManager produces warning trying to unbind EventDispatcher

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • jbossws-1.0.4
    • jbossws-1.0.3
    • ws-eventing
    • None

    Description

      Related to a WARN produced when shuting down jboss:

      23:53:00,053 WARN [SubscriptionManager] Cannot unbind event dispatcher: javax.naming.NameNotFoundException: EventDispatcher not bound

      org/jboss/ws/eventing/mgmt/SubscriptionManager.java althouth it lazily binds the EventDispatcher, it always tries to unbind it:
      public void stop()
      {
      log.debug("Stop subscription manager");
      try
      {
      // remove event dispatcher
      Util.unbind(new InitialContext(), EventingConstants.DISPATCHER_JNDI_NAME);

      // stop thread pool
      threadPool.shutdown();

      // stop the watchdog
      watchDog.shutdown();

      for (URI eventSourceNS : eventSourceMapping.keySet())

      { removeEventSource(eventSourceNS); }

      }
      catch (NamingException e)

      { log.warn("Cannot unbind event dispatcher: " + e.toString()); }

      }

      Something like the following is needed:
      private void unbindEventDispatcher()
      {
      if (isDispatcherBound)
      {
      try

      { // remove event dispatcher Util.unbind(new InitialContext(), EventingConstants.DISPATCHER_JNDI_NAME); isDispatcherBound = false; }

      catch (NamingException e)

      { log.warn("Cannot unbind event dispatcher: " + e.toString()); }

      }
      }

      public void stop()
      {
      log.debug("Stop subscription manager");

      unbindEventDispatcher()

      // stop thread pool
      threadPool.shutdown();

      // stop the watchdog
      watchDog.shutdown();

      for (URI eventSourceNS : eventSourceMapping.keySet())

      { removeEventSource(eventSourceNS); }

      }

      Attachments

        Issue Links

          Activity

            People

              rhn-support-hbraun Heiko Braun
              dandread1@redhat.com Dimitrios Andreadis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: