Reputation: 5709
How do I replace this deprecated method with something that is not?
public class StrTransformer extends AbstractMessageTransformer {
@Override
public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException {
LOGGER.debug("transformMessage");
//getSessionProperty is deprecated. Javadocs say, I can use muleSession
//but muleSession is not available from this method.
//Any ideas?
return message.getSessionProperty("TEST_PROPERTY");
}
}
Upvotes: 0
Views: 288
Reputation: 526
You can get the session property as follows:
message.getProperty("myProperty", PropertyScope.SESSION);
Upvotes: 1