Good question.... The mediator model is a little bit like the Servlet model.
There is one instance of the mediator, and it must be reentrant/threadsafe. The mediator is not persisted (to disk), but as long as the instance of Synapse is running then the mediator will maintain its state. If you want to do say a counter properly, you could do a synchronized block around the count so that if multiple threads hit it at the same time it would be ok. At the moment we do not "reload" the config, but in the future we might start doing that, in which case you would need to save your data outside the mediator. Paul On 7/5/06, Khurram Masood <[EMAIL PROTECTED]> wrote:
Hi Are mediators in Synapse (custom or default) persistent or do they get called by synapse and then die. How can I attach a data structure with a mediator that is persistent all the time. Because I want the data-structure to be constructed once and be alive all the time with the mediator Regards Khurram.
-- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
