@Override public void unmanage(Location loc) { if (isInitialManagementContextReal()) { initialManagementContext.getLocationManager().unmanage(loc); } else { throw new IllegalStateException("Non-deployment context "+this+" is not valid for this operation: cannot unmanage "+loc); } }
protected boolean removeChild(Location child) { boolean removed; synchronized (childLocations) { removed = childLocations.remove(child); } if (removed) { if (child instanceof Closeable) { Closeables.closeQuietly((Closeable)child); } child.setParent(null); if (isManaged()) { managementContext.getLocationManager().unmanage(child); } } return removed; }