for (ComponentService service : component.getServices()) {
if (logger.isLoggable(Level.FINE)) {
logger.fine("Stopping component service: " + component.getURI() + "#" + service.getName());
}
for (Binding binding : service.getBindings()) {
ServiceBindingProvider bindingProvider = ((RuntimeComponentService)service).getBindingProvider(binding);
if (bindingProvider != null) {
bindingProvider.stop();
}
}
}
for (ComponentReference reference : component.getReferences()) {
if (logger.isLoggable(Level.FINE)) {
logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
}
RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
for (Binding binding : reference.getBindings()) {
ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
if (bindingProvider != null) {
bindingProvider.stop();
}
}
}
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {