[infinispan-commits] Infinispan SVN: r2368 - branches/4.2.x/core/src/main/java/org/infinispan/remoting.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Tue Sep 14 11:52:49 EDT 2010


Author: manik.surtani at jboss.com
Date: 2010-09-14 11:52:48 -0400 (Tue, 14 Sep 2010)
New Revision: 2368

Modified:
   branches/4.2.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
Log:
30s wait for a cache to exist is arbitrary and unnecessary?

Modified: branches/4.2.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
===================================================================
--- branches/4.2.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	2010-09-14 15:33:35 UTC (rev 2367)
+++ branches/4.2.x/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	2010-09-14 15:52:48 UTC (rev 2368)
@@ -44,11 +44,11 @@
    public Response handle(CacheRpcCommand cmd) throws Throwable {
       String cacheName = cmd.getCacheName();
       ComponentRegistry cr = gcr.getNamedComponentRegistry(cacheName);
-      long giveupTime = System.currentTimeMillis() + 30000; // arbitraty (?) wait time for caches to start
-      while (cr == null && System.currentTimeMillis() < giveupTime) {
-         Thread.sleep(100);
-         cr = gcr.getNamedComponentRegistry(cacheName);
-      }
+//      long giveupTime = System.currentTimeMillis() + 30000; // arbitraty (?) wait time for caches to start
+//      while (cr == null && System.currentTimeMillis() < giveupTime) {
+//         Thread.sleep(100);
+//         cr = gcr.getNamedComponentRegistry(cacheName);
+//      }
 
       if (cr == null) {
          if (log.isInfoEnabled()) log.info("Cache named {0} does not exist on this cache manager!", cacheName);
@@ -58,7 +58,7 @@
       Configuration localConfig = cr.getComponent(Configuration.class);
 
       if (!cr.getStatus().allowInvocations()) {
-         giveupTime = System.currentTimeMillis() + localConfig.getStateRetrievalTimeout();
+         long giveupTime = System.currentTimeMillis() + localConfig.getStateRetrievalTimeout();
          while (cr.getStatus().startingUp() && System.currentTimeMillis() < giveupTime) Thread.sleep(100);
          if (!cr.getStatus().allowInvocations()) {
             log.warn("Cache named [{0}] exists but isn't in a state to handle invocations.  Its state is {1}.", cacheName, cr.getStatus());



More information about the infinispan-commits mailing list