}
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
stop(compositeContext, (Composite)implementation);
} else {
final ImplementationProvider implementationProvider = ((RuntimeComponent)component).getImplementationProvider();
if (implementationProvider != null) {
try {
// Allow bindings to read properties. Requires PropertyPermission read in security policy.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
implementationProvider.stop();
return null;
}
});
} catch (Throwable ex){
Monitor.error(monitor, this, "core-messages", "StopException", ex);