Preferences prefs,
boolean autoStart,
SharedLibrary[] sharedLibraries) {
this.bundle = bundle;
this.componentDesc = componentDesc;
this.component = new ComponentWrapper(component);
this.prefs = prefs;
this.runningState = loadState(autoStart ? State.Started : State.Shutdown);
this.serviceUnits = new HashSet<ServiceUnitImpl>();
this.sharedLibraries = sharedLibraries;
this.componentClassLoader = component.getClass().getClassLoader();