I don't rely on that lock. This assumes that the restart process will take a while (a few seconds, maybe) so that other threads will get the lock on the monitor, enter the sync block as well, and then also attempt to perform a restart. And here is where they block (on restartComponent()) until the first restarter finishes, then they can all resume.
Your approach - to have the restart call within the sync block - is also valid, but it would mean repeating the restart try/catch block for every cache loader method. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201867#4201867 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4201867 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user