1. Lingo
  2. LINGO-23

making an async call to a service prevents subsequent calls to server from being made


    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Labels:
    • Number of attachments :


      Making an async call to a service prevents subsequent calls from being made prior to when the asyn method on the server completes execution.

      Consider the Lingo test case org.logicblaze.lingo.example.ExampleTest#testClient

      Change the deplay in ExampleServiceImpl.asyncRequestResponse(String stock, ResultListener listener) to 35 seconds.

      public void testClient() throws Exception

      { // START SNIPPET: simple // lets lookup the client in Spring // (we could be using DI here instead) ExampleService service = (ExampleService) getBean("client"); // regular synchronous request-response int i = service.regularRPC("Foo"); System.out.println("Found result: " + i); // async request-response TestResultListener listener = new TestResultListener(); service.asyncRequestResponse("IBM", listener); //------------> sanjiv : new test code int ret = service.regularRPC("foo"); System.out.println("return value is " + ret); //------------> sanjiv : end new test code // the server side will now invoke the listener // objects's methods asynchronously // END SNIPPET: simple listener.waitForAsyncResponses(2); System.out.println("Found results: " + listener.getResults()); }

      In the example above, the async call is made (which runs for 35 seconds on the "server"). However when the next call of "ret = service.regularRPC("foo");" is made on the client, it blocks and eventaully times out.

      If we call an asynchronous call instead of service.regularRPC, that message is never received by the server.

      This is the same behaviour when the destination is a Queue or a Topic.


        No work has yet been logged on this issue.


          • Assignee:
            Sanjiv Jivan


            • Created: