uDIG
  1. uDIG
  2. UDIG-362

Deleting Layers does not cancel WMS Requests

    Details

      Description

      Add a WMS layer (preferably a moderately slow one).
      Zoom into the layer (job meter starts running).
      Right click and delete layer (job meter keeps running).

        Activity

        Hide
        Jesse Eichar added a comment -
        This occurs because the geotools wms codes does not provide a way to cancel the getMap request so the UDIG renderer blocks on the request and is unable to respond to a cancel. If the getMap request performed its request in a seperate thread the UDIG code could be something like the following.

        wms.startRequest();
        while ( !cancelled && !wms.hasResult )
           this.wait(500);

        if( !cancelled )
           draw(wms.getResult());
        Show
        Jesse Eichar added a comment - This occurs because the geotools wms codes does not provide a way to cancel the getMap request so the UDIG renderer blocks on the request and is unable to respond to a cancel. If the getMap request performed its request in a seperate thread the UDIG code could be something like the following. wms.startRequest(); while ( !cancelled && !wms.hasResult )    this.wait(500); if( !cancelled )    draw(wms.getResult());
        Hide
        Jody Garnett added a comment -
        So jesse can we not just abandon the renderer? Just becase it will finish (and will try to draw a map at that time), does not mean we still have to listen to it (or do anything when it tells us it is ready).

        What is stopping us from:
        1) telling the old renderers to stop
        2) starting up a new set of renderers
        3) carrying on like normal?

        I suspect the answer is trying to reuse the renderers? I would not worry:
        a) they externalize all state to Layer (StyleBlack blackboard, and properties)
        b) They don't even manage their "context", they don't own a raster for example
        c) they don't own/hold resources (you have your resource decorator that captures FeatureSources)

        The only thing they could do (back in the day) is listen to a resource they were interested in and redraw without further intervention. I am not sure if that is still there responsibility (or does someone else listen now?)

        Jody
        Show
        Jody Garnett added a comment - So jesse can we not just abandon the renderer? Just becase it will finish (and will try to draw a map at that time), does not mean we still have to listen to it (or do anything when it tells us it is ready). What is stopping us from: 1) telling the old renderers to stop 2) starting up a new set of renderers 3) carrying on like normal? I suspect the answer is trying to reuse the renderers? I would not worry: a) they externalize all state to Layer (StyleBlack blackboard, and properties) b) They don't even manage their "context", they don't own a raster for example c) they don't own/hold resources (you have your resource decorator that captures FeatureSources) The only thing they could do (back in the day) is listen to a resource they were interested in and redraw without further intervention. I am not sure if that is still there responsibility (or does someone else listen now?) Jody
        Hide
        Jody Garnett added a comment -
        Is this fixed now? We did make the move to abandon renderer that are waiting for external services such as WMS. But I am not sure if this applys when deleting?
        Show
        Jody Garnett added a comment - Is this fixed now? We did make the move to abandon renderer that are waiting for external services such as WMS. But I am not sure if this applys when deleting?

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul Ramsey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: