Remove an existing Host. @param name MBean Name of the component to remove @exception Exception if a component cannot be removed
(String name)
| 748 | * @exception Exception if a component cannot be removed |
| 749 | */ |
| 750 | public void removeHost(String name) throws Exception { |
| 751 | |
| 752 | // Acquire a reference to the component to be removed |
| 753 | ObjectName oname = new ObjectName(name); |
| 754 | String hostName = oname.getKeyProperty("host"); |
| 755 | Service service = getService(oname); |
| 756 | Engine engine = service.getContainer(); |
| 757 | Host host = (Host) engine.findChild(hostName); |
| 758 | |
| 759 | // Remove this component from its parent component |
| 760 | if (host != null) { |
| 761 | engine.removeChild(host); |
| 762 | } |
| 763 | } |
| 764 | |
| 765 | |
| 766 | /** |
nothing calls this directly
no test coverage detected