Dynamic Requests

Dynamic binding enables routing of incoming requests to target services as they are needed at runtime.

The target interfaces in a mediation flow correspond to component references in an ActiveMatrix composite. Typically, a component reference is wired to a composite reference that points to a service provider. This static binding is specified when the mediation component and composite are designed, and the service binding is hard-coded into the composite.

Dynamic binding allows components to supply a reference to the service provider when the deployable application archive (DAA) created from the composite is running.

The below diagram shows the differences between static and dynamic binding in composite references.

Static and dynamic binding


The composite reference is statically bound to Service A. However, the dynamic composite reference can invoke Service B, Service C, or Service X without having to specify a static configuration at design time.

Dynamic references allow the component to specify which service to invoke. Therefore, new services can be started and a component can invoke those services without redesigning the composite and restarting the DAA created from the composite.

One example of using dynamic references is a set of services that return information for United States postal ZIP codes. The consumer sends a message to a mediation component containing the ZIP code. The service provider can implement a number of services for particular ZIP codes. When new ZIP codes are introduced, dynamic binding allows the service provider to create and start a new service for the new ZIP codes without changing any existing composites. Requests for information about new ZIP codes are handled without system downtime.