* Message store
*/
public void modifyMessageStore(String xml) throws AxisFault {
try {
OMElement msElem = createElement(xml);
MessageStore messageStore =
MessageStoreFactory.createMessageStore(msElem, new Properties());
if(messageStore == null) {
String message = "Unable to edit the message Store. Error in the configuration";
handleException(log,message,null);
}
SynapseConfiguration configuration = getSynapseConfiguration();
MessageStore oldMessageStore = configuration.getMessageStore(messageStore.getName());
if(oldMessageStore != null) {
// this means there is an existing message store
//1st we clean up the old
configuration.removeMessageStore(oldMessageStore.getName());
oldMessageStore.destroy();
// then we startup the new.
String fileName = oldMessageStore.getFileName();
messageStore.setFileName(fileName);
messageStore.init(getSynapseEnvironment());
configuration.addMessageStore(messageStore.getName(),messageStore);
MediationPersistenceManager mp = getMediationPersistenceManager();
mp.saveItem(messageStore.getName(),ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);