[infinispan-commits] Infinispan SVN: r2369 - trunk/core/src/main/java/org/infinispan/remoting.
infinispan-commits at lists.jboss.org
infinispan-commits at lists.jboss.org
Tue Sep 14 11:56:23 EDT 2010
Author: manik.surtani at jboss.com
Date: 2010-09-14 11:56:22 -0400 (Tue, 14 Sep 2010)
New Revision: 2369
Modified:
trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
Log:
30s wait for a cache to exist is arbitrary and unnecessary?
Modified: trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java
===================================================================
--- trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java 2010-09-14 15:52:48 UTC (rev 2368)
+++ trunk/core/src/main/java/org/infinispan/remoting/InboundInvocationHandlerImpl.java 2010-09-14 15:56:22 UTC (rev 2369)
@@ -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