if (purgeStr != null) {
String physicalName = actionRequest.getParameter(PHYSICAL_NAME);
String resourceAdapterModuleName = actionRequest.getParameter(RESOURCE_ADAPTER_MODULE_NAME);
JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(actionRequest, resourceAdapterModuleName);
try {
helper.purge(actionRequest, JMSDestinationInfo.create(actionRequest));
} catch (Exception e) {
portlet.addErrorMessage(actionRequest, portlet.getLocalizedString(actionRequest, "activemq.errorMsg04", physicalName), e.getMessage());
logger.error("Fail to purge message destination " + physicalName, e);
}
}