Exception ex = null; try { if (pool.getPoolOrCacheCancelInProgress() != null) { return null;
while (primary == null && pool.getPoolOrCacheCancelInProgress() == null) { List servers = findQueueServers(excludedServers, 1, false, printPrimaryNotFoundError, "Could not find any server to host primary client queue. Number of excluded servers is %s and exception is %s");
if (pool.getPoolOrCacheCancelInProgress() != null) { return true; while (pool.getPoolOrCacheCancelInProgress() == null && ((additionalBackups = redundancyLevel - getCurrentRedundancy()) > 0 || redundancyLevel == -1)) {
|| pool.getPoolOrCacheCancelInProgress() != null) { isBadConnection = true; } else {
if (pool.getPoolOrCacheCancelInProgress() == null && logger.isDebugEnabled()) { logger.debug("Error making a backup server the primary server for client subscriptions", e);
snapshot = queueConnections; while (snapshot.getPrimary() == null && !snapshot.primaryDiscoveryFailed() && !shuttingDown && pool.getPoolOrCacheCancelInProgress() == null) { try { lock.wait();
redundancySatisfierTask = null; if (pool.getPoolOrCacheCancelInProgress() != null) {
if (pool.getPoolOrCacheCancelInProgress() != null) { return; while (newPrimary == null && pool.getPoolOrCacheCancelInProgress() == null) { List backups = queueConnections.getBackups(); newPrimary = promoteBackupToPrimary(backups);
private boolean recoverInterest(final QueueConnectionImpl newConnection, final boolean isFirstNewConnection) { if (pool.getPoolOrCacheCancelInProgress() != null) { return true; } // recover interest try { recoverAllInterestTypes(newConnection, isFirstNewConnection); newConnection.getFailureTracker().reset(); return true; } catch (CancelException ignore) { return true; // ok to ignore we are being shutdown } catch (VirtualMachineError err) { SystemFailure.initiateFailure(err); // If this ever returns, rethrow the error. We're poisoned // now, so don't let this thread continue. throw err; } catch (Throwable t) { SystemFailure.checkFailure(); pool.getCancelCriterion().checkCancelInProgress(t); logger.warn("QueueManagerImpl failed to recover interest to server " + newConnection.getServer(), t); newConnection.getFailureTracker().addFailure(); newConnection.destroy(); return false; } }