Object service = context.getService(reference);
if (service instanceof ContentRepository) {
ContentRepository repository = (ContentRepository) service;
services.put(reference, context.registerService(
Repository.class.getName(),
new RepositoryImpl(repository, executor),
new Properties()));
return service;
} else {
context.ungetService(reference);
return null;