2 Replies Latest reply on Jun 20, 2006 5:10 PM by mazz

    stream server not dying

    mazz Master

      I have a TestNG test suite that runs to test my integration with the remoting's streaming feature. The first test runs fine but the rest of the tests fail with this:

      Caused by: org.jboss.remoting.InvalidConfigurationException: The invoker for locator (InvokerLocator [socket://]) is already in use by another Connector. Either change the locator or add new handlers to existing Connector.
       at org.jboss.remoting.InvokerRegistry.createServerInvoker(InvokerRegistry.java:532)
       at org.jboss.remoting.transport.Connector.init(Connector.java:399)
       at org.jboss.remoting.transport.Connector.create(Connector.java:761)
       at org.jboss.remoting.stream.StreamServer.setupServer(StreamServer.java:139)
       at org.jboss.remoting.stream.StreamServer.<init>(StreamServer.java:79)

      What are the causes that would keep that stream server still up even after I successfully slurped in the full data from the input stream. I also made sure I closed the input stream on in the stream handler (on the true server side).

        • 1. Re: stream server not dying
          mazz Master

          According to the Javadocs of StreamServer:

          * NOTE: That once this class receives the close() method called
          * from the server, it will also stop and destroy the internal
          * remoting server, since is assumed there will be no more callbacks
          * (since the stream itself is closed).

          but this does not seem to be true. Looking at the code that receives the close() invocation, all it does is close the stream:

           else if(StreamHandler.CLOSE.equals(method))

          I see no code in here at all the destroys the connector - looking at all references to the connector data member, all I see is it get started but no where does it stop it.

          Am I seeing this right? If there is no way to shut this down, how does a client VM stream more than one input stream? Once that connector is up, the next time you try to instantiate StreamServer, it fails since the connector already exists.

          I'll submit a JIRA since it looks like this is a problem.