I was looking at the Vosao CMS code, an open source CMS hosted by the Google App Engine (which I find an amazing idea), and I came across the following code inside the CurrentUser class :
public class CurrentUser {
private static UserEntity user;
public static UserEntity getInstance2() {
return user;
}
public static void setInstance2(UserEntity aUser) {
user = aUser;
}
}
I have never used GAE, but it sounds very strange to me.
Is GAE really single-threaded? Is it safe to store data with query scope in a static field when using GAE?
Does this mean that for each instance of JVM will run only HTTP-request one , and all other requests are waiting for?
GAE? , GAE UserEntity ? ThreadLocal , Spring ? - bean ( Injection Dependency)?