Uploaded image for project: 'JBoss Remoting'
  1. JBoss Remoting
  2. JBREM-738

ServerThread/invoker still executing invocation after its related TransportServer was stopped

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.4.0.Beta1 (Pinto)
    • None
    • transporter
    • None

    Description

      get an exception on the third iteration of a transporter client to a transporter server where the client code is doing the same invoke each time. This should not happen as the first two iterations give correct result. The exception is thrown from the server side as apparently the jboss remoting internals are confused – stating that a ServerInvoker is not in "started state".
      Exception is

      java.lang.reflect.UndeclaredThrowableException
      at $Proxy4.toString(Unknown Source)
      at java.lang.String.valueOf(String.java:2615)
      at java.lang.StringBuilder.append(StringBuilder.java:116)
      at proxy.Client.testClientCall(Client.java:38)
      at proxy.Client.main(Client.java:115)
      Caused by: org.jboss.remoting.ServerInvoker$InvalidStateException: Can not proc
      ess invocation request since is not in started state.
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:751)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(S
      erverThread.java:568)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.
      java:390)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.ja
      va:164)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClient
      Invoker.java:163)
      at org.jboss.remoting.Client.invoke(Client.java:1548)
      at org.jboss.remoting.Client.invoke(Client.java:534)
      at org.jboss.remoting.Client.invoke(Client.java:522)
      at org.jboss.remoting.transporter.TransporterClient.invoke(TransporterC
      lient.java:297)

      to reproduce this (one way at least):
      run the transporter sample modified for the Client to execute the the makeClientCall multiple times.
      Now
      to get past the obvious first issue (socket in use) add new code for
      customerProcessor.releaseCustomer(processedCustomer.getCustomerId()
      in the Client just before the
      TransporterClient.destroyTransporterClient(customerProcessor);

      Implement this method in the CustomerProcessorImpl to use the id to locate (eg hash get()) the related ICustomer TransporterClient and destroy it and to the TransporterServer to stop it.
      This theoretically frees up the Customer "server" allowing for the next iteration by the Client.
      note that the processCustomer() implemenation is modified to store the TransporterClient and TransporterServer that are created here.

      ------------

      I dug into the code a bit and what i gathered is that a ServerThread is trying to do processInvocation using a SocketServerInvoker that was already "stopped". I think the ServerThread itself should not be executing as the TransporterServer it should be involved with was already stopped.

      I posted to the jboss forum on issues i was having trying to make the transporter sample run from the client multiple times. See issue by "bord" on 4/17/2007

      Attachments

        Activity

          People

            Unassigned Unassigned
            bord_jira craig bordelon
            Archiver:
            samahaja@redhat.com Sagar Mahajan

            Dates

              Created:
              Updated:
              Resolved:
              Archived: