public void uninstall(boolean force) throws Exception {
// Shut down
stop(force);
// Retrieve shared library
SharedLibrary library = deployer.getSharedLibrary(getName());
if (library == null && !force) {
throw ManagementSupport.failure("uninstallSharedLibrary", "SharedLibrary '" + getName() + "' is not installed.");
}
// Check that it is not used by a running component
if (library.getComponents().length > 0 && !force) {
StringBuilder sb = new StringBuilder();
for (Component comp : library.getComponents()) {
if (sb.length() > 0) {
sb.append(", ");
}
sb.append(comp.getName());
}