Modules and libraries

When building integrated business solutions with WebSphere® Integration Developer, you will create modules, mediation modules, and/or libraries to contain the resources and code.

WebSphere Integration Developer provides a simple organization of resources to let you quickly build and test integrated business solutions without worrying about the details of the generated artifacts. You can create a module (sometimes referred to as the business integration module) or a mediation module and immediately start to create business integration applications, including resources such as business objects, interfaces, and so on. Generated code will be automatically placed in default locations, and supporting artifacts that do not have to be manipulated when creating the applications are hidden in the views. This topic briefly describes the purpose of modules and libraries and how you will work with them.

Modules for business services

A module is a WebSphere Business Integration project that is used for development, version management, organizing business service resources, and deploying to the WebSphere Process Server. Business services include processes, human tasks, state machines, business rules, and Java™ services. In fact, a module is the basic unit of deployment to this runtime environment. You can add dependent libraries, Java projects, and J2EE projects to a module and choose to deploy them with the module.

The module provides the business services, which are modeled as Service Components Architecture (SCA) components wired together in its module assembly. This module can contain all the resources that are used in the service, but these resources are private and can only be used within the module. To reuse the logic in a module from other modules, you can export the component's interfaces. For details on components, see the related concepts listed at the end of this topic.

Libraries

Often, interfaces, business objects, business object maps, events, relationships, roles, and Web service ports need to be shared so that resources in several modules can use them. The library is a project that is used to store these resources; contents in this project can be shared.

In order for a module or mediation module to use the resources from a library, it has to be added as a dependent to the module. A library cannot be deployed by itself. However, you can add a library to the module and select to deploy it with the module. Also, you can add library dependencies to a library; for example, if one library uses resources in another library, then you would need to add the library dependency. For details on dependencies, see the related concepts listed at the end of this topic.

Example: Modules and libraries for business services

To illustrate the use of modules and libraries for business services, look at this example of a customer enquiry application. When the customer ID is supplied, the customer's portfolio information is returned. Processing this enquiry requires two additional services: one to access the customer's account information and another to find out the current stock price. The following diagram shows this application:
Picture showing the required application

Using our Customer enquiry example, three modules and a library are created, as shown in the Business Integration view:

The three modules and library are shown in the Business Integration view

This integrated application has three modules and a library:
  • CustomerQuery module contains the integrated customer query application in its module assembly
  • CustomerInfo module stores the resources for the CustomerInfo service. The exported interface of the CustomerInfo component makes the service usable in the CustomerQuery module's assembly
  • StockQuote module stores the resources for the StockQuote service. The exported interface of the StockQuote component makes the service usable in the CustomerQuery module assembly.
  • SharedLib library stores the common business objects and interfaces (for example the StockQuoteInterface and CustomerInfoInterface) that are used by the modules.

See the related concepts for more information on components and modules.

Mediation module

A mediation module is a WebSphere Business Integration project that is used for development, version management, organizing resources, and deploying to the WebSphere Enterprise Service Bus or the WebSphere Process Server. Mediation services consist of flows that intercept and modify messages between service consumers (exports) and service providers (imports). You can add dependent libraries, Java projects, and J2EE projects to a mediation module and choose to deploy them with the module.

A mediation module provides a mediation service, which is modeled as Service Components Architecture (SCA) components wired together in its module assembly. This module can contain all the resources that are used in the service, but these resources are private and can only be used within the module. To reuse the logic in a module from other modules, you can export the component's interfaces. For details on components, see the related concepts listed at the end of this topic.

A mediation module can have these implementation types:
  • Mediation Flow
  • Java
Note: a mediation module can contain only one mediation flow component.

Example: Mediation modules and libraries

To illustrate the use of mediation modules and libraries, we will use a simple example of a stock quote service application; when the customer ID and stock symbol are supplied, the query is processed by the mediation flow. The customer's subscription level is determined, and depending on the type of subscription, the query is routed to the appropriate service provider and the stock quote is returned to the client application. The following picture shows this application:
Picture showing the example application

Using our stock quote example, a mediation module and a library are created, as shown in the Business Integration view:

Business Integration view showing the StockQuote mediation module and a library

The mediation module and library contain the following resources:
  • StockQuote mediation module stores the module assembly and mediation logic for the Stock Quote mediation service. The exported interface StockQuoteService makes the mediation module usable to the client application. The imported interfaces DelayedServicePortType and RealtimeServicePortType make the service from the providers available to the mediation module. The mediation flow component StockQuote_MediationFlow has the logic for logging, filtering, routing and transforming. The XML maps are used to generate XSL style sheets to transform the message to a form that is compatible with the receiving service.
  • Resources library stores the business objects, interfaces and bindings that are used by the mediation module.

Working with other projects

If you need to work with JSP files, JAR files, Web projects, Java projects, and J2EE projects, see the topic "Best practices: Modules and packaging" under related reference for more information.

Related concepts
Modules and libraries dependencies
Business integration capabilities and roles
Business integration cheat sheets
Best practices: Sharing projects
Business services: Components and modules
Mediation services: Components and mediation modules
Related tasks
Creating a module for business services
Creating a mediation module
Changing default namespaces
Enabling tools capabilities
Adding dependencies to modules and libraries
Creating the library
Creating exports
Related reference
Best practices: Modules and packaging for business services
Best practices: Mediation modules and packaging
Business Integration perspective and views
Documentation of resources
WSDL and Java interfaces and references

Related information

Tutorial: Work with modules and libraries

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