- public final Service[] start(String aContext,
- Service[] aRequiredServices) {
- LOG.info("Initializing '" + aContext + "." + _name + "' with "
- + Arrays.asList(aRequiredServices));
- doStart(aContext + "." + getName(), aRequiredServices);
- return _running.values().toArray(new Service[0]);
+ public final void start(String aContext) {
+ LOG.info("Initializing '" + aContext + "." + _name + "'");
+ doStart(aContext + "." + getName());
+ _status = Status.RUNNING;
+ if ( _running.size() != _provided.size()) {
+ List<ProvidedInterface> remaining =
+ new ArrayList<ProvidedInterface>(_provided);
+ remaining.removeAll(_running);
+ throw new SystemAssemblyException(aContext + "." + getName() + ": not all services were started, missing " + remaining);
+ }