Source:
public boolean saveEntry(String ele) throws LocalEntryAdminException { final Lock lock = getLock(); try { lock.lock(); OMElement elem; try { elem = nonCoalescingStringToOm(ele); } catch (XMLStreamException e) { return false; } if (elem == null) { handleFault(log, "Unable to save local entry. Null definition"); } String key = elem.getAttributeValue( new QName(XMLConfigConstants.NULL_NAMESPACE, "key")); if (key != null) { log.debug("Saving local entry with key : " + key); key = key.trim(); Entry oldEntry = getSynapseConfiguration(). getDefinedEntries().get(key); if (oldEntry == null) { handleFault(log, "Unable to update local entry. Non existent"); } else { Entry entry = EntryFactory.createEntry(elem, getSynapseConfiguration().getProperties()); getSynapseConfiguration().removeEntry(key); getSynapseConfiguration().addEntry(key, entry); entry.setFileName(oldEntry.getFileName()); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), ServiceBusConstants.LOCAL_ENTRY_TYPE + File.separator + key)) { cAppArtifactDataService.setEdited(getTenantId(), ServiceBusConstants.LOCAL_ENTRY_TYPE + File.separator + key); } else { MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(getAxisConfig()); pm.saveItem(key, ServiceBusConstants.ITEM_TYPE_ENTRY); } if (log.isDebugEnabled()) { log.debug("Added local entry : " + key + " into the configuration"); } } } } catch (SynapseException syne) { handleFault(log, "Unable to add local entry ", syne); } catch (OMException e) { handleFault(log, "Unable to add local entry.Invalid XML ", e); } catch (Exception e) { e.printStackTrace(); } finally { lock.unlock(); } return true; }

Target:
public boolean saveEntry(String ele) throws LocalEntryAdminException { final Lock lock = getLock(); try { lock.lock(); OMElement elem; try { elem = nonCoalescingStringToOm(ele); } catch (XMLStreamException e) { return false; } if (elem == null) { handleFault(log, "Unable to save local entry. Null definition"); } String key = elem.getAttributeValue( new QName(XMLConfigConstants.NULL_NAMESPACE, "key")); if (key != null) { log.debug("Saving local entry with key : " + key); key = key.trim(); Entry oldEntry = getSynapseConfiguration(). getDefinedEntries().get(key); String artifactName = getArtifactName(artifactType, key); if (oldEntry == null) { handleFault(log, "Unable to update local entry. Non existent"); } else { Entry entry = EntryFactory.createEntry(elem, getSynapseConfiguration().getProperties()); getSynapseConfiguration().removeEntry(key); getSynapseConfiguration().addEntry(key, entry); entry.setFileName(oldEntry.getFileName()); CAppArtifactDataService cAppArtifactDataService = ConfigHolder.getInstance(). getcAppArtifactDataService(); if (cAppArtifactDataService.isArtifactDeployedFromCApp(getTenantId(), artifactName)) { cAppArtifactDataService.setEdited(getTenantId(), artifactName); } else { MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(getAxisConfig()); pm.saveItem(key, ServiceBusConstants.ITEM_TYPE_ENTRY); } if (log.isDebugEnabled()) { log.debug("Added local entry : " + key + " into the configuration"); } } } } catch (SynapseException syne) { handleFault(log, "Unable to add local entry ", syne); } catch (OMException e) { handleFault(log, "Unable to add local entry.Invalid XML ", e); } catch (Exception e) { handleFault(log, "Unable to add local entry ", e); } finally { lock.unlock(); } return true; }