< Previous | Next >

Change the quality of service at runtime

When we built the sample, we promoted the Filter pattern property, to allow us to change the value of the property at runtime. Now, we will change the value of the Filter pattern property in the unit test environment's administrative console, which will cause the request to be sent to a different service. We will view the result in the test client emulator.

To perform the actions described in this task, the server scripts must be run to install the runtime components. For instructions, see Install the runtime components.
Open the StockQuote assembly diagram, and follow these steps to test the promoted property of the Filter primitive:
  1. Right-click StockQuote_MediationFlow and select Test Component.
  2. In the Events page, enter these initial request parameters, and click Continue.
    • For symbol, enter AAA.
    • For customerID, enter CustomerB.
    Events page
  3. Select the server for the unit test environment. Click Finish and enter the username and password to login to the server. The default is admin\admin.

    The results in the emulator show that the service invoked is RealtimeService. You can also see the value of the qualityOfService string which tells you that this customer's service level is premium.

    Events page showing RealtimeService invoked

  4. Switch to the Servers view. Right-click the server, and select Administration > Run administrative console. In the log in window, enter your userid and password (the default is admin/admin). Click Log in.
  5. In the administrative console, expand Applications and click SCA modules.
  6. In the list of applications, click StockQuote.
    SCA modules list
  7. Click Module Properties.
    SCA module properties
  8. The property that we promoted earlier is displayed, showing the alias PREMIUM_SERVICE. Click the value field of PREMIUM_SERVICE, and change "premium" to "standard". Click Apply.
    Promoted Filter property
  9. In the messages window, click Save.
    Save prompt in the Messages window
  10. In the SCA Modules window, click the Save button.
    SCA Modules save window
  11. Switch to the Events page of the test client. Click Invoke Invoke button on the upper left side of the page.
  12. Keep AAA as the symbol value, and enter CustomerB, the premium service customer, as the customerID value. Click Continue

    The results in the Events area show DelayedService as the invoked service.

    DelayedService in Events page

< Previous | Next >





Feedback



This information center is powered by Eclipse technology. (http://www.eclipse.org)