3 Replies Latest reply on Sep 3, 2003 12:27 PM by nphelps

    dynamically creating an destroying topics

    geejee

      I've been experimenten with dynamically creating and destroing of topics with the RMIAdapter. To a certain extend this all works fine.
      Creating atopic, publish and subscribe to it, is no problem.
      However, if I try to destroy the topic using the RMI adapter and the DestinationManager, this only works out ok if all of the subscribers have closed the connection. If there are still open subscriber connections an JMSException is thrown informing me that "The desitination is being used.".
      After this it is not possible (or so it seems) to recreate a topic with the same name without either restarting jboss or using the jmx-console.

      Can someone explain what exactly is happening here and how to solve the "dilemma" of destroying a topic that might have open connections?

        • 1. Re: dynamically creating an destroying topics
          nphelps

          Seriously? Take your pick, either the DestinationManager throws an exception when you try and delete a destination that is in use, or all the clients producing/consuming that destination get an exception. I know which one I'd choose...

          • 2. Re: dynamically creating an destroying topics
            geejee

            Fair enough. But after the stack trace I get when trying to destroy the Topic there is an info log message saying topic destroyed and it is no longer possible to connect / subscribe to the topic.
            I would exect the destroy either to fail completely or to succeed completely, but this seems a bit inconsistend.

            • 3. Re: dynamically creating an destroying topics
              nphelps

              LOL, so you're saying that you get both. That would be bug in my opinion. I reccommend you either submit it via SourceForge or modify the destination manager and submit a patch.