ServiceReference<Resolver> resref = resolverRef.get();
ServiceReference<Repository> repref = repositoryRef.get();
if (registration == null && resref != null & repref != null) {
context.removeServiceListener(listener);
Resolver resolver = context.getService(resref);
Repository repository = context.getService(repref);
Runtime runtime = RuntimeLocator.getRequiredRuntime();
RuntimeEnvironment environment = new RuntimeEnvironment(runtime).initDefaultContent();
BundleContextResourceInstaller installer = new BundleContextResourceInstaller(context, environment);
Provisioner provisioner = new DefaultProvisioner(environment, resolver, repository, installer);
registration = context.registerService(Provisioner.class, provisioner, null);