* a MessageStore with the given xml.
*/
public void addMessageStore(String xml) throws AxisFault {
try {
OMElement msElem = createElement(xml);
MessageStore messageStore =
MessageStoreFactory.createMessageStore(msElem, new Properties());
if (messageStore != null && messageStore.getName() != null) {
// Here we must Init the message store and set a file name and then
// save it to the configuration.
// Then We must persist the created Message Store
SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
String fileName = ServiceBusUtils.generateFileName(messageStore.getName());
messageStore.setFileName(fileName);
messageStore.init(getSynapseEnvironment());
synapseConfiguration.addMessageStore(messageStore.getName(), messageStore);
MediationPersistenceManager mp = getMediationPersistenceManager();
mp.saveItem(messageStore.getName(), ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);
} else {
String message = "Unable to create Message Store ";
handleException(log, message, null);
}