Cool Very nice.
Now what would be really cool as a next step would be to the synapse.xml be small static, that imports the "real" synapse.xml from a registry. Then the whole config is dynamic and I can add proxy services or rules without restarting. Paul On 7/31/06, Asankha C. Perera <[EMAIL PROTECTED]> wrote:
It is now possible to define a dynamic sequence in Synpase, using the same DynamicProperty & Registry concepts designed by Paul. The following example shows how a registry is first defined into Synapse (we only have support for a simple URL registry as of now), and how a named sequence is defined into Synapse, with a key into this registry. Now when the sequence is requested from the Synapse Configuration, it will look this up in the local cache, and if available and not yet expired - will use the sequence already built. If expired, it will compare the cached version number with the current copy in the registry and if required will update the cache and meta information (e.g. how long it could be cached etc), if expired but the version number matches, only meta information is updated. If the local cache does not exist or is outdated, a new copy from the registry is fetched, and the resulting sequence cached. The following example is a trivial case which attempts to show this feature, and this could be enhanced as required with the capabilities of the registry implementation. Next in store on this line of changes are, - Dynamic main mediator (Synapse Rules) - Dynamic Endpoints - Dynamic Proxies asankha -------------------------------- synapse configuration --------------------------------------- <synapse xmlns="http://ws.apache.org/ns/synapse"> <registry provider="org.apache.synapse.registry.url.SimpleURLRegistry"> <property name="root" value=""/> <property name="cachableDuration" value="15000"/> </registry> <definitions> <sequence name="dynamicsequence" key="file:synapse_repository/conf/sample/dynamic_sequence.xml"/> </definitions> <rules> <sequence ref="dynamicsequence"/> </rules> </synapse> -------------------------------- dynamic_sequence.xml --------------------------------------- <log level="custom" xmlns="http://ws.apache.org/ns/synapse"> <property name="something" value="*** Test Message ***"/> <drop/> </log> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- 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]
