if (logger.isLoggable(Level.FINE)) {
logger.fine("Stopping component service: " + component.getURI() + "#" + service.getName());
}
for (Endpoint endpoint : service.getEndpoints()) {
endpointRegistry.removeEndpoint(endpoint);
final ServiceBindingProvider bindingProvider = ((RuntimeComponentService)service).getBindingProvider(endpoint.getBinding());
if (bindingProvider != null) {
// Allow bindings to read properties. Requires PropertyPermission read in security policy.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
bindingProvider.stop();
return null;
}
});
}
}
}
for (ComponentReference reference : component.getReferences()) {
if (logger.isLoggable(Level.FINE)) {
logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
}
RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
for (EndpointReference endpointReference : reference.getEndpointReferences()) {
final ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(endpointReference.getBinding());
if (bindingProvider != null) {
// Allow bindings to read properties. Requires PropertyPermission read in security policy.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
bindingProvider.stop();
return null;
}
});
}
}