@Override public void onManagementStarting() { super.onManagementStarting(); Preconditions.checkNotNull(getName(), "Name must be specified"); }
@Override public void onManagementStarting() { super.onManagementStarting(); Lifecycle state = getAttribute(SERVICE_STATE); if (state == Lifecycle.RUNNING) { rebind(); } else if (state != null && state != Lifecycle.CREATED) { log.warn("On start-up of {}, not (re)binding because state is {}", this, state); } else { // Expect this is a normal start() sequence (i.e. start() will subsequently be called) setAttribute(SERVICE_UP, false); setAttribute(SERVICE_STATE, Lifecycle.CREATED); } }
entity.onManagementStarting(); } catch (Throwable t) { managementFailed.set(true);
@Override public void onManagementStarting() { super.onManagementStarting(); exchange = (getConfig(EXCHANGE_NAME) != null) ? getConfig(EXCHANGE_NAME) : getDefaultExchangeName(); virtualHost = getConfig(RabbitBroker.VIRTUAL_HOST_NAME); setAttribute(RabbitBroker.VIRTUAL_HOST_NAME, virtualHost); machine = (SshMachineLocation) Iterables.find(getParent().getLocations(), Predicates.instanceOf(SshMachineLocation.class)); shellEnvironment = getParent().getShellEnvironment(); }