views:

11

answers:

0

I've a SmartGWT ListGrid which loads some data using gwt-rpc service calls. My grid has a datasource with a fetch method like this :

protected void executeFetch(final String requestId, final DSRequest request, final DSResponse response) {
    try{

        MyServiceAsync myProxy = MyServiceUtil.getProxy();
        myProxy.getDataAndFillListGridAsync();

    }catch(Exception ex){
        LogUtil.logException(ex);
    }
}

& this is my getProxy implementation :

public class MyServiceUtil extends GwtRpcServiceUtil {

public static MyServiceAsync getProxy(){
    MyServiceAsync myProxy = (MyServiceAsync)GWT.create(MyService.class);
    ((ServiceDefTarget)myProxy).setServiceEntryPoint(GWT.getModuleBaseURL() + "myService?"+Math.random());
    return myProxy;
}}

When I run my application in development mode in eclipse, it works fine, but when I build & deploy it on tomcat 5.5, sometimes when I change my database, it still loads previous data from some cache which I dont know where is that because I checked the new requests using firebug & I know in every grid refresh, the new requests send to the tomcat (consider that I used Math.random() to generate new url for every service call, but it couldn't solve my problem)

Any suggestion ?