/** * This method removes the identified method. * * @param method The method to remove. * @throws com.rift.coad.daemon.jython.JythonDaemonException */ public void removeMethod(DataMapperMethod method) throws JythonDaemonException { try { Session session = SemanticUtil.getInstance(JythonMappingManagerDaemonImpl.class).getSession(); List<DataMapperMethod> methods = listMethods(session); for (DataMapperMethod meth : methods) { if (meth.equals(method)) { session.remove(meth); methods.remove(meth); DataMapperBrokerUtil util1 = new DataMapperBrokerUtil(Constants.SERVICE_ID, Constants.DATA_MAPPER); util1.register(methods.toArray(new DataMapperMethod[0])); return; } } log.debug("The entry was not found to remove."); throw new JythonDaemonException("The entry was not found to remove."); } catch (JythonDaemonException ex) { throw ex; } catch (Exception ex) { log.error("Failed to add method : " + ex.getMessage(), ex); throw new JythonDaemonException("Failed to add method : " + ex.getMessage(), ex); } }