ESB 12
WSO2 ESB Tutorial:
Introduction to
Dynamic Sequences with
Registry
Index
1. Introduction
2. EI configuration Example
3. Running Example
4. Conclusion
Introduction to
Dynamic Sequences with
Registry
Index
1. Introduction
2. EI configuration Example
3. Running Example
4. Conclusion
1. Introduction
As we show in previous blog with XSLT mediator, a sequence can be defined dynamically through the registry. Artefact that can be configured dynamically are: sequences, endpoints and configuration resources. On the following example the sequence is referenced as a key. That key is related with a value stored into the registry. That value is loaded dynamically by the ESB at runtime and cached. After the cache duration time expired the resource is reloaded if needed.
2. EI configuration Example
The following image shows Enterprise Integrator configuration:
The resource that main sequence key makes reference, and is dynamically loaded, is this one: file:
samples/service-bus/resources/sequence/dynamic_seq_1.xml
The content of that sequence is displayed below the definition XML file. A log mediator displays a message and the request is redirected to the endpoint. The response is directed to the Client by the send mediator.
3. Running Example
There are two ways to launch the request:
- In the folder /samples/axis2Client with the command line:
ant stockquote -Daddurl=http://localhost:9000/services/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/
- Or using SOAPUI and writing the request.
The next image displays SOAPUI Request. Do not forget to include the header: SOAPAction with the value: urn:getQuote to invoke the appropriate method on Server side.
When executing the example for second time and after less than 15 secongs since the previous request was launch, the resource continues into the cache. If dynamic_seq_1.xml is modified and after more than 15 seconds, the sequence is going to be reloaded.
Next images displays Request and Response:
This is the response coming from the backend:
4. Conclusion
Thanks to the dynamic behaviour of Synapse through the use of a registry there are a few resources that can be modified and loaded without EI restarting.




















