I do not think You are wrong. However, sometimes You do not need
application-wide but instance-wide locking. For example let's assume this:
class SomeClass{
static SomeObject someObject = null;
SomeObject getSomeObject(){
if(someObject == null){
//Long Initialization
someObject = ...;
}
return someObject;
}
}
If the initialization is long it is possible that many threads will enter
the if(someObject == null) block. I'd like to avoid that. After all long
processing can cost me money.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.