return this.build(target, DEFAULT_CONTAINER);
}
public ServiceBuilder<T> build(ServiceTarget target, String container) {
final BatchServiceTarget batchTarget = target.batchTarget();
batchTarget.addService(this.serviceName, this.service).setInitialMode(ServiceController.Mode.NEVER).install();
batchTarget.addService(this.singletonServiceName.append("singleton"), new ValueService<Singleton>(new ImmediateValue<Singleton>(this))).addDependency(this.singletonServiceName).setInitialMode(ServiceController.Mode.PASSIVE).install();
final ServiceListener<T> listener = new AbstractServiceListener<T>() {
@Override
public void serviceRemoveRequested(ServiceController<? extends T> controller) {
batchTarget.removeServices();