[infinispan-commits] Infinispan SVN: r2452 - trunk/core/src/main/java/org/infinispan/remoting.

infinispan-commits at lists.jboss.org infinispan-commits at lists.jboss.org
Wed Sep 29 11:23:03 EDT 2010


Author: pferraro
Date: 2010-09-29 11:23:03 -0400 (Wed, 29 Sep 2010)
New Revision: 2452

Modified:
   trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
Log:
[ISPN-673] Stopped cache still causing RPC timeouts on caller
Skip wait loop for when not using strict p2p.

Modified: trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	2010-09-29 15:19:30 UTC (rev 2451)
+++ trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java	2010-09-29 15:23:03 UTC (rev 2452)
@@ -54,18 +54,19 @@
       ComponentRegistry cr = gcr.getNamedComponentRegistry(cacheName);
 
       if (cr == null) {
-         // lets see if the cache is *defined* and perhaps just not started.
-         if (isDefined(cacheName)) {
-            log.info("Will try and wait for the cache to start");
-            long giveupTime = System.currentTimeMillis() + 30000; // arbitrary (?) wait time for caches to start
-            while (cr == null && System.currentTimeMillis() < giveupTime) {
-               Thread.sleep(100);
-               cr = gcr.getNamedComponentRegistry(cacheName);
+         if (embeddedCacheManager.getGlobalConfiguration().isStrictPeerToPeer()) {
+            // lets see if the cache is *defined* and perhaps just not started.
+            if (isDefined(cacheName)) {
+               log.info("Will try and wait for the cache to start");
+               long giveupTime = System.currentTimeMillis() + 30000; // arbitrary (?) wait time for caches to start
+               while (cr == null && System.currentTimeMillis() < giveupTime) {
+                  Thread.sleep(100);
+                  cr = gcr.getNamedComponentRegistry(cacheName);
+               }
+            } else {
+               log.info("Cache {0} is not defined.  No point in waiting.", cacheName);
             }
-         } else {
-            log.info("Cache {0} is not defined.  No point in waiting.", cacheName);
          }
-
          if (cr == null) {
             if (log.isInfoEnabled()) log.info("Cache named {0} does not exist on this cache manager!", cacheName);
             return new ExceptionResponse(new NamedCacheNotFoundException(cacheName));



More information about the infinispan-commits mailing list