Hi Charitha,

On Wed, Jul 23, 2014 at 11:33 PM, Charitha Kankanamge <[email protected]>
wrote:

> Hi,
>
> Can someone please explain the following behavior?
>
> Inside the *mediate* method in a class mediator, the following returns
> NULL.
>
> context.getProperty("SERVER_IP")
>
> However, the following returns correct property value.
>
> context.getEntry("SERVER_IP")
>
This is because 'SERVER_IP' is not a property but an entry added to the
synapse configuration while the initialization.

>
> But context.getEntry("SYSTEM_DATE") still returns null.
>
SYSTEM_DATE is again not a message context property or an entry. In
get-property function there is a special logic to get the system date from
java utils.

>
> Another observation. When I set a property inside mediation flow
> (e.g:- <property name="myprop" value="TESTVALUE" scope="default"
> type="STRING"/>), then I can read it straightaway using inside class
> mediator.
>
> context.getProperty("myprop")
>
> Why the difference? What am I missing?
>

Thanks.

>
> Thanks!
> Charitha
>



-- 
*Isuru Udana*
Senior
* Software Engineer*
WSO2 Inc.; http://wso2.com
email: [email protected] cell: +94 77 3791887
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to