Package org.apache.geronimo.console.jmsmanager.helper

Examples of org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelper


    }

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
            throws PortletException, IOException {       
        String resourceAdapterModuleName = request.getParameter(RESOURCE_ADAPTER_MODULE_NAME);
        JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
        JMSMessageInfo[] messages;
        try {
            JMSDestinationInfo jmsDestinationInfo = JMSDestinationInfo.create(request);
            messages = helper.getMessagesList(request, jmsDestinationInfo, null);
            request.setAttribute(MESSAGES, messages);
            request.getPortletSession(true).setAttribute(MESSAGES, messages);
        } catch (Exception e) {
            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg03"), e.getMessage());
            request.setAttribute(MESSAGES, new JMSMessageInfo[0]);
View Full Code Here


                messageInfo.setPriority(TextMessage.DEFAULT_PRIORITY);
            }
            messageInfo.setJmsType(jmsType);
            messageInfo.setMessage(message);

            JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
            try {
                helper.sendMessage(request, JMSDestinationInfo.create(request), messageInfo);
                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "activemq.infoMsg01"));
            } catch (Exception e) {
                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg01"), e.getMessage());
                log.error("Error encountered while sending message.", e);
                // throw new PortletException(e);
View Full Code Here

    public String actionBeforeView(ActionRequest actionRequest, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        String purgeStr = actionRequest.getParameter(PURGE);
        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);
            }
        }
View Full Code Here

                messageInfo.setPriority(TextMessage.DEFAULT_PRIORITY);
            }
            messageInfo.setJmsType(jmsType);
            messageInfo.setMessage(message);

            JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
            try {
                helper.sendMessage(request, JMSDestinationInfo.create(request), messageInfo);
                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "activemq.infoMsg01"));
            } catch (Exception e) {
                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg01"), e.getMessage());
                log.error("Error encountered while sending message.", e);
                // throw new PortletException(e);
View Full Code Here

    public String actionBeforeView(ActionRequest actionRequest, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        String purgeStr = actionRequest.getParameter(PURGE);
        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);
            }
        }
View Full Code Here

    }

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
            throws PortletException, IOException {       
        String resourceAdapterModuleName = request.getParameter(RESOURCE_ADAPTER_MODULE_NAME);
        JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
        JMSMessageInfo[] messages;
        try {
            JMSDestinationInfo jmsDestinationInfo = JMSDestinationInfo.create(request);
            messages = helper.getMessagesList(request, jmsDestinationInfo, null);
            request.setAttribute(MESSAGES, messages);
            request.getPortletSession(true).setAttribute(MESSAGES, messages);
        } catch (Exception e) {
            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg03"), e.getMessage());
            request.setAttribute(MESSAGES, new JMSMessageInfo[0]);
View Full Code Here

    }

    public void renderView(RenderRequest request, RenderResponse response, MultiPageModel model)
            throws PortletException, IOException {       
        String resourceAdapterModuleName = request.getParameter(RESOURCE_ADAPTER_MODULE_NAME);
        JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
        JMSMessageInfo[] messages;
        try {
            JMSDestinationInfo jmsDestinationInfo = JMSDestinationInfo.create(request);
            messages = helper.getMessagesList(request, jmsDestinationInfo, null);
            request.setAttribute(MESSAGES, messages);
            request.getPortletSession(true).setAttribute(MESSAGES, messages);
        } catch (Exception e) {
            portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg03"), e.getMessage());
            request.setAttribute(MESSAGES, new JMSMessageInfo[0]);
View Full Code Here

                messageInfo.setPriority(TextMessage.DEFAULT_PRIORITY);
            }
            messageInfo.setJmsType(jmsType);
            messageInfo.setMessage(message);

            JMSMessageHelper helper = JMSMessageHelperFactory.getMessageHelper(request, resourceAdapterModuleName);
            try {
                helper.sendMessage(request, JMSDestinationInfo.create(request), messageInfo);
                portlet.addInfoMessage(request, portlet.getLocalizedString(request, "activemq.infoMsg01"));
            } catch (Exception e) {
                portlet.addErrorMessage(request, portlet.getLocalizedString(request, "activemq.errorMsg01"), e.getMessage());
                log.error("Error encountered while sending message.", e);
                // throw new PortletException(e);
View Full Code Here

    public String actionBeforeView(ActionRequest actionRequest, ActionResponse response, MultiPageModel model) throws PortletException, IOException {
        String purgeStr = actionRequest.getParameter(PURGE);
        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);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.console.jmsmanager.helper.JMSMessageHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.