for (ComponentService service : component.getServices()) {
for(Binding binding : service.getBindings()){
if (binding instanceof SCABinding) {
// TODO could do with changing the sca binding SPI
// to carry this piece of information
SCABindingImpl scaBinding = (SCABindingImpl)binding;
scaBinding.setDistributedDomain(this);
}
}
}
for (ComponentReference reference : component.getReferences()) {
for(Binding binding : reference.getBindings()){
if (binding instanceof SCABinding) {
// TODO could do with changing the sca binding SPI
// to carry this piece of information
SCABindingImpl scaBinding = (SCABindingImpl)binding;
scaBinding.setDistributedDomain(this);
}
}
// and reference targets. strange one this but the wiring puts
// all the bindings into a references target if the target remains
// unresolved after building
// This actually the only ones we really need to set as by now
// the service and reference bindings will already be resolved
// but it's not doing any hame for the time being
for ( ComponentService target : reference.getTargets()){
for(Binding binding : target.getBindings()){
if (binding instanceof SCABinding) {
// TODO could do with changing the sca binding SPI
// to carry this piece of information
SCABindingImpl scaBinding = (SCABindingImpl)binding;
scaBinding.setDistributedDomain(this);
}
}
}
}
}