Reference reference = null;
try {
reference = buildReference(referenceName, className,
interfaceName, true);
} catch (Exception e) {
throw new ComponentUpdaterException(e.getMessage());
}
source.getImplementation().getReferences().add(reference);
// targetService.
ComponentService targetService = assemblyFactory
.createComponentService();
targetService.setUnresolved(true);
targetService.setName(targetComponent);
targetReference.getTargets().add(targetService);
// reconciliate
reconcileReference(reference, targetReference, componentName);
// create component reference for the reference
source.getReferences().add(targetReference);
try {
processor.resolveReference(targetReference, contrib
.getModelResolver());
} catch (ContributionResolveException e) {
throw new ComponentUpdaterException(
"Contribution Resolving Exception while updating..");
}
CompositeActivatorImpl activator = (CompositeActivatorImpl) compositeActivator;
compositeBuilder.attachWire(source, composite, targetReference);