We have code that looks like this:
Data getSomeData(key)
{
Data theData = theCache.get(node, key);
if (theData == null)
{
theData = read the data from database
theCache.putForExternalRead(node, key, the data from database);
return theData;
}
Now suppose we have a bunch of threads that hit getSomeData at the same time
with the same key.
Will several threads get a null data, read from the database, and do the
putForExternalRead, with only the first call to putForExternalRead having any
effect?
It would be desirable not to have to pay the overhead of multiple database
reads in this situation.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215030#4215030
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215030
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user