[jboss-user] [JBoss Cache: Core Edition] - Re: TcpDelegatingCacheLoader

manik.surtani@jboss.com do-not-reply at jboss.com
Wed Jan 14 11:36:04 EST 2009


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



More information about the jboss-user mailing list