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);