I found a problem in my GWT application that when I use one user to open two GWT clients and call the same server method, one client get the data just the same as the another, but it is wrong. How to avoid this problem.
for example: I open a page to do plus calculate 1+1 and get answer from server method add(), and at the same time, i open another page to do plus calculate 2+2 and get answer from the same server method, I get the same answer that 1+1=2 and 2+2=2 too. My english is not good enough to descript this problem more clearly By the way, I use global variables to store data in servlet.
Another example:
public class ConfigServiceImpl extends GwtConfigController implements ConfigService {
private String serviceInstanceId = "";
public String testConnection() {
if(serviceInstanceId.trim().length() > 0){
return "error : serviceInstanceId";
}
serviceInstanceId = "test";
return serviceInstanceId;
}
}
In my client widget init, call testConnection. I open two page to test, first page, return "test", second return error message.