Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Abort or terminate the Request which takes long time to respond back

    Hi, I have an application developed using SmartGWT,Jaxrs,ejb &jpa. I have one scenario where user wants to extract the data(called Search Screen) by entering either firstname,lastname or middlebane,ssn,email,etc Database contains the huge number of records in millions, which takes lot of time to respond back. for example, user search with firstname which takes lot of time to respond, in that case user wants to cancel/terminate/abort the request. Is it possible either in smartgwt or jaxrs(web api) to terminate the request. So that user can terminate the request and move further PS:: i tried lot of option,but i didn't get the proper solution.

  • #2
    See RPCManager.cancelQueue().

    Comment


    • #3
      Hi isomorphic,
      thanks for your response..
      I tried this option as well but it's not cancelling the request since the request is already sent from client to server.
      Again RPCManager.cancelQueue() will stop the server operation at the back end? Or will it only terminate the request..

      Version:smartgwt 6.0

      Comment


      • #4
        It will sever the client-side connection to the server. Whether this immediately aborts server-side processing is up to your servlet engine; in our experience, most do not actually abort processing until the servlet that received the request tries to write a response.

        The only sure-fire way to abort server-side processing would be to send a *second* request which interrupts the first thread's processing via some complicated cross-thread communication. Feel free to look into how this is done, but we can pretty much tell you now: this is quite complicated, may not be feasible anyway, and is unlikely to have an overall positive effect on server performance. You are much better off trying to optimize your database so it isn't so terribly slow.

        Comment

        Working...
        X