response = (InvocationResponse)client.invoke(invocation, null);
ret = client.invoke(invocation, null);
   public Object invoke(Invocation invocation) throws Throwable   {      if (log.isTraceEnabled()) { log.trace("invoking " + ((MethodInvocation)invocation).getMethod().getName() + " on server"); }      invocation.getMetaData().addMetaData(Dispatcher.DISPATCHER,                                           Dispatcher.OID,                                           id, PayloadKey.AS_IS);            String methodName = ((MethodInvocation)invocation).getMethod().getName();            InvocationResponse response = null;            if ("getClientAOPConfig".equals(methodName))      {         //This is invoked on it's own connection         InvokerLocator locator = new InvokerLocator(serverLocatorURI);                  Client client = new Client(locator);                  try         {                        response = (InvocationResponse)client.invoke(invocation, null);                        invocation.setResponseContextInfo(response.getContextInfo());         }         finally         {            client.disconnect();         }      }      else if ("createConnectionDelegate".equals(methodName))      {         //This must be invoked on the same connection subsequently used by the created JMS connection         JMSRemotingConnection connection = new JMSRemotingConnection(serverLocatorURI);                  MethodInvocation mi = (MethodInvocation)invocation;                  //Fill in the client connection id - this is needed on the server side         //so if the connection fails we can tie together the failed remoting connection         //and the server side connectiondelegate object so we can clean them up         Object[] args = mi.getArguments();         args[2] = connection.getId();                      try         {                        response = (InvocationResponse)connection.getInvokingClient().invoke(invocation, null);                        invocation.setResponseContextInfo(response.getContextInfo());                        //TODO - We should simplify this by considering combining the "state" and the "client delegate"            //objects - right now this is somewhat over complex            //with some state being stored in the client delegate objects and other state            //stored in the client state objects.            //We could probably get rid of the client state objects and just use the client delegate objects            //for storing state.                        ClientConnectionDelegate delegate = (ClientConnectionDelegate)response.getResponse();                        delegate.setConnnectionState(connection);         }         catch (Throwable t)         {            connection.close();                        throw t;         }       }      else      {         throw new IllegalStateException("Unknown invocation");      }      if (log.isTraceEnabled()) { log.trace("got server response for " + ((MethodInvocation)invocation).getMethod().getName()); }      return response.getResponse();   }