Hi Kim, You cannot get the messageContext into the POJOCommand mediator, and it doesn't support the init method as well.
You have the access to the message context through the properties because it always set and get the properties from the current message, you can use the UpdateMessage action with a xpath expression to update the message with the out put from the POJO. Thanks, Ruwan On Tue, Mar 10, 2009 at 7:17 AM, kimhorn <[email protected]> wrote: > > > Should / Can the POJO implement ManagedLifecycle to get the Synapse > Environment to get the > MesageContext? > > > > kimhorn wrote: > > > > Does any one have a Java example of a POJOCommand that uses Message > > Context. > > Unclear how you access it from execute method ? > > > > Background to this is in "Java Class Properties Setting" item, including > > the Java > > code. > > > > Basically it was recomended to convert this from a Mediator to a POJO but > > not > > sure it can be done ? > > > > > > > > > > -- > View this message in context: > http://www.nabble.com/Accessing-Message-Context-in-POJOCommand-tp22425548p22426517.html > Sent from the Synapse - User mailing list archive at Nabble.com. > > -- Ruwan Linton Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb WSO2 Inc.; http://wso2.org email: [email protected]; cell: +94 77 341 3097 blog: http://ruwansblog.blogspot.com
