Remove an existing Service. @param name MBean Name of the component to remove @exception Exception if a component cannot be removed
(String name)
| 825 | * @exception Exception if a component cannot be removed |
| 826 | */ |
| 827 | public void removeService(String name) throws Exception { |
| 828 | |
| 829 | if (!(container instanceof Server)) { |
| 830 | throw new Exception(sm.getString("mBeanFactory.notServer")); |
| 831 | } |
| 832 | |
| 833 | // Acquire a reference to the component to be removed |
| 834 | ObjectName oname = new ObjectName(name); |
| 835 | Service service = getService(oname); |
| 836 | ((Server) container).removeService(service); |
| 837 | } |
| 838 | |
| 839 | |
| 840 | /** |
nothing calls this directly
no test coverage detected