/** * Default start will start all Startable children (child.start(Collection<? extends Location>)), * calling preStart(locations) first and postStart(locations) afterwards. */ @Override public void start(Collection<? extends Location> locations) { this.addLocations(locations); setAttribute(Attributes.SERVICE_STATE, Lifecycle.STARTING); recordApplicationEvent(Lifecycle.STARTING); try { preStart(locations); StartableMethods.start(this, locations); postStart(locations); } catch (Exception e) { setAttribute(Attributes.SERVICE_STATE, Lifecycle.ON_FIRE); recordApplicationEvent(Lifecycle.ON_FIRE); // no need to log here; the effector invocation should do that throw Exceptions.propagate(e); } setAttribute(SERVICE_UP, true); setAttribute(Attributes.SERVICE_STATE, Lifecycle.RUNNING); deployed = true; recordApplicationEvent(Lifecycle.RUNNING); log.info("Started application " + this); }