Generating bindings for imports and exports

A binding describes a protocol for calling a piece of code. The binding, then, determines how the import or export interact with clients outside the module where the import and export reside.

Bindings for imports and exports have different purposes. An export binding describes how that export (or service) will be published or made available to clients outside the module. The kind of binding determines what kind of client is supported; for example, a Web service binding makes the service available to any Web-based client, while an SCA binding makes it available to other SCA modules.

Import bindings tell the SCA run time processes how to access an external service. For example, if I publish a service with an SCA export binding, an import with a JMS binding will not be able to successfully call it.

Here are some notes on bindings for imports and exports:

  • The import binding does not have to be defined at development time; it can be defined at deployment time.
  • For an import that is generated from an export, Web service, or EJB, the binding type of the import will be specified for you.
  • If you are creating the import using the palette, you will have to specify a binding type for the external service technology in order to test it.
  • An SCA (Service Components Architecture) binding on an import specifies that the code being imported is either a component or import exported from another SCA module. As a result, the SCA import binding requires only two pieces of information: the name of the export it is calling and the module containing that export. The export must also have an SCA export binding. You must import an export from another module using the corresponding binding type (although you could import its implementation using another binding type).
  • When you use the Generate Export action to generate an export, you need to select the binding so that the binding is generated when the export is created.
  • Creating an export specifies that a component or import is being externalized for use outside the module. The main reason for specifying the SCA binding type on the export is that it allows for the most efficient cross-module calls of the exported entity. If, for example, you were to specify the Web service export binding, the component/import would be invoked across the Web instead of via something approximating a direct call. A reason to not use the SCA export binding would be to allow clients outside of the SCA programming model to invoke the exported component or import. Note that you can create more than one export for a component or import, so you could effectively export the component or import with more than one binding if you specify a different binding type on each of the exports. You could even choose to export one set of interfaces with one binding type and another set of interfaces with another binding type. Because the SCA bindings are easy to use (for example, the SCA export binding requires no binding information), you might choose to use them for prototyping work, and replace or augment them as the prototype later evolves.
  • If an export in a module assembly does not have any binding, when deployed, SCA binding is assumed.
  • Once the binding has been generated for an import or export, you can use the Remove Binding action to remove the binding, or the Replace Binding action to replace the binding.
  • The import and export has different icons to indicate the type of binding. The following image shows an import and an export with no bindings:

    An import and an export with no bindings

  • Imports and exports have Binding properties that can be modified in the Properties view. Select the import or export in the assembly diagram to see its properties in the Properties view.
  • For additional EIS and JMS bindings information, see

When you use the palette to create imports and exports, you can generate the binding, as follows:

  1. If there is no interface defined on the import or export, add the interface first. See related tasks for instructions on adding the interface.
  2. Right-click on the import or export and select Generate Binding and the type of binding.
The binding will be generated for the import or export and its icon will change to indicate the type of binding that it has. To change the binding for an export or import, you can use Replace Binding or Remove Binding actions.
Related concepts
Components and mediation modules
Approaches to assembling a mediation module
Quality of service: Qualifiers for mediation services
Using Java in a mediation module
Related tasks
Creating a mediation module
Opening a mediation module assembly
Setting assembly editor preferences
Adding and wiring components
Editing the properties of elements in the mediation module assembly
Adding Qualities of Service (QoS) qualifiers
Processing events in a sequence
Working with implementations
Invoking a module from another module
Interoperability with services from other vendors
Fixing errors in the assembly diagram
Best practice: Do not make changes to J2EE staging projects
Mediation services: Adding an interface to a node
Related reference
Assembly editor for mediation modules

Related information

Tutorial: Wire components using the assembly editor
Tutorial: Create a mediation flow
Samples: Mediation Flow editor

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.