Examples of UMOEventContext


Examples of org.mule.umo.UMOEventContext

            {
                result = getResult(src);
            }

            // set the event properties on the Message
            UMOEventContext ctx = RequestContext.getEventContext();
            if (ctx == null)
            {
                logger.warn("There is no current event context");
                return result;
            }

            this.setJmsProperties(ctx.getMessage(), result);

            return result;
        }
        catch (TransformerException tex)
        {
View Full Code Here

Examples of org.mule.umo.UMOEventContext

        registerSourceType(JMSMessage.class);
    }

    public Object doTransform(Object src, String encoding) throws TransformerException
    {
        UMOEventContext context = RequestContext.getEventContext();
        if (context == null) {
            throw new TransformerException(new org.mule.config.i18n.Message(Messages.NO_CURRENT_EVENT_FOR_TRANSFORMER), this);
        }
        JMSMessage mqMessage = (JMSMessage)src;
        try {
            context.setProperty(JMS_FOLDER_PROPERTY, mqMessage._getJmsFolder());
            if(logger.isDebugEnabled()) logger.debug("Setting " + JMS_FOLDER_PROPERTY + " property to " + context.getProperty(JMS_FOLDER_PROPERTY));
        } catch (JMSException e) {
            throw new TransformerException(new org.mule.config.i18n.Message("mqs", 1, "<jms>"), this, e);
        }
        try {
            context.setProperty(USR_FOLDER_PROPERTY, mqMessage._getUsrFolder());
            if(logger.isDebugEnabled()) logger.debug("Setting " + USR_FOLDER_PROPERTY + " property to " + context.getProperty(USR_FOLDER_PROPERTY));
        } catch (JMSException e) {
            throw new TransformerException(new org.mule.config.i18n.Message("mqs", 1, "<usr>"), this, e);
        }
        try {
            context.setProperty(MCD_FOLDER_PROPERTY, mqMessage._getMcdFolder());
            if(logger.isDebugEnabled()) logger.debug("Setting " + MCD_FOLDER_PROPERTY + " property to " + context.getProperty(MCD_FOLDER_PROPERTY));
        } catch (JMSException e) {
            throw new TransformerException(new org.mule.config.i18n.Message("mqs", 1, "<mcd>"), this, e);
        }

        return super.doTransform(mqMessage, encoding);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.