internalSetState(new ReconnectTask(), state, InternalState.SEND_STDIN); } catch (Exception e) { ROOT_LOGGER.logf(DEBUG_LEVEL, e, "failed to send reconnect task");
internalSetState(new ReconnectTask(), state, InternalState.SEND_STDIN); } catch (Exception e) { ROOT_LOGGER.logf(DEBUG_LEVEL, e, "failed to send reconnect task");
/** * Unregister the mgmt channel. * * @param old the proxy controller to unregister * @param shuttingDown whether the server inventory is shutting down * @return whether the registration can be removed from the domain-controller */ protected synchronized boolean callbackUnregistered(final TransactionalProtocolClient old, final boolean shuttingDown) { // Disconnect the remote connection protocolClient.disconnected(old); // If the connection dropped without us stopping the process ask for reconnection if(! shuttingDown && requiredState == InternalState.SERVER_STARTED) { final InternalState state = internalState; if(state == InternalState.PROCESS_STOPPED || state == InternalState.PROCESS_STOPPING || state == InternalState.STOPPED) { // In case it stopped we don't reconnect return true; } try { HostControllerLogger.ROOT_LOGGER.tracef("trying to reconnect to %s current-state (%s) required-state (%s)", serverName, state, requiredState); internalSetState(new ReconnectTask(), state, InternalState.SEND_STDIN); } catch (Exception e) { HostControllerLogger.ROOT_LOGGER.debugf(e, "failed to send reconnect task"); } return false; } else { return true; } }
/** * Try to reconnect to a started server. */ protected synchronized void reconnectServerProcess() { if(this.requiredState != InternalState.SERVER_STARTED) { ROOT_LOGGER.reconnectingServer(serverName); this.requiredState = InternalState.SERVER_STARTED; internalSetState(new ReconnectTask(), InternalState.STOPPED, InternalState.SEND_STDIN); } }
/** * Try to reconnect to a started server. */ synchronized void reconnectServerProcess(final ManagedServerBootCmdFactory factory) { if(this.requiredState != InternalState.SERVER_STARTED) { this.bootConfiguration = factory; this.requiredState = InternalState.SERVER_STARTED; ROOT_LOGGER.reconnectingServer(serverName); internalSetState(new ReconnectTask(), InternalState.STOPPED, InternalState.SEND_STDIN); } }
/** * Try to reconnect to a started server. */ synchronized void reconnectServerProcess(final ManagedServerBootCmdFactory factory) { if(this.requiredState != InternalState.SERVER_STARTED) { this.bootConfiguration = factory; this.requiredState = InternalState.SERVER_STARTED; ROOT_LOGGER.reconnectingServer(serverName); internalSetState(new ReconnectTask(), InternalState.STOPPED, InternalState.SEND_STDIN); } }