wso2esb - Temporary Storage in wso2 esb -


i have come across 1 requirement in have use 1 token, getting 3rd party , need reuse token different transaction until gets expired. don't want keep token in database. there way can keep token in temporary storage of wso2 esb , and reuse , whenever required, need update wso2 esb logic anytime.

thanks in advance!

regards, shri

you can use js script save global value , reuse in different transactions :

<script language="js"><![cdata[                              var curvalue = mc.getenvironment().getservercontextinformation().getproperty("myvalue");     if (curvalue == null) {                      curvalue = 0;                } else {         curvalue++;     }     mc.getenvironment().getservercontextinformation().addproperty("myvalue",curvalue);     mc.setproperty("currentvalue",curvalue); ]]></script> 

you can current value inside mediation get-property('currentvalue')

value lost when shutdown / restart esb


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -