Set up a service integration bus

WebSphere Application Server messaging configuration

The high-level configuration steps are as follows to configure messaging within WebSphere Application Server for the MDB sample:

  1. Configure the service bus

  2. Configure the bus members

  3. Configure the destinations

  4. Verify the messaging engine startup

  5. Configure JMS connection queue factory

  6. Configure the destination JMS queue

  7. Configuration of a JMS activation specification

Service integration buses

A service integration bus supports applications using message-based and service-oriented architectures. A bus is a group of one or more interconnected servers or server clusters that are members of the bus. Applications connect to a bus at one of the messaging engines associated with its bus members.

The following capabilities are provided by a service integration bus:

A service integration bus comprises a SIB Service, which is available on each application server in the WebSphere Application Server environment. By default, the SIB Service is disabled. This means that when a server starts it does not have any messaging capability. The SIB Service is automatically enabled when you add the server to a service integration bus. You can choose to disable the service again by configuring the server.

A service integration bus supports asynchronous messaging; that is, sending messages asynchronously. Asynchronous messaging is possible regardless of whether the consuming application is running or not, or if the destination is available or not. Point-to-point and publish/subscribe messaging are also supported.

After an application has connected to the bus, the bus behaves as a single logical entity and the connected application does not need to be aware of the bus topology. In many cases, connecting to the bus and defining bus resources is handled by an application programming interface (API) abstraction, for example the administered JMS connection factory and JMS destination objects.

The service integration bus is sometimes referred to as the messaging bus if it is used to provide the messaging system for JMS applications using the default messaging provide.

Many scenarios require a simple bus topology; perhaps, for example, a single server. By adding multiple servers to a single bus, you can increase the number of connection points for applications to use. By adding server clusters as members of a bus, you can increase scalability and achieve high availability. Servers, however, do not have to be bus members to connect to a bus. In more complex bus topologies, multiple buses are configured, and may be interconnected to form complex networks. An enterprise might deploy multiple interconnected buses for organizational reasons. For example, an enterprise with several autonomous departments might want to have separately administered buses in each location.

Configure the service bus

To configure the service bus, do the following:

  1. From the WebSphere Administrative Console, select Service integration > Buses.

  2. Click New.

  3. Enter the following and then click OK:

    Name: IBASampleBus

    – Uncheck Secure.

    Service integration bus

  4. Click Save and then when prompted click Save to Save to Master Configuration.

    New service integration bus

Configure the bus members

The members of a service integration bus are the application servers and clusters within which messaging engines for that bus can run. When you add a new bus member, you configure its data store.

When you add a server as a member of a bus, WebSphere Application Server creates a messaging engine for the server, with default properties. By default, the messaging engine is configured to use the default JDBC data source and Cloudscape JDBC Provider for its data store. If you want to assign your own data source JNDI name rather than using the default one, you have the choice of using he Cloudscape JDBC provider or use an existing data source which allows you to use a different JDBC provider (for example Oracle, DB2 and so on.) If you subsequently delete a bus member and then recreate it, first you must manually delete the old data source to ensure that once the new messaging engine is created, it will restart.

To configure the Bus members, do the following:

  1. Select Service integration > Buses.

  2. Click the IBASampleBus created in the previous section.

  3. Under Additional Properties, click Bus members.

  4. Click Add.

  5. The default Bus member name is the <hostnameNode:server>. For example, our Bus name is RADNode:server1. Accept the defaults for the remaining fields and click Next.

    New Bus member

  6. Click Finish.

    Bus member

  7. Click Save and then when prompted click Save to Save to Master Configuration.

Configure the destinations

To configure the destinations for messaging, do the following:

  1. Select Service integration > Buses.

  2. Click the IBASampleBus.

  3. Under Additional Properties, click Destinations.

  4. Click New.

  5. When the Create new destination page appears, select Queue and then click Next.

    Create new destination

  6. Enter the Identifier. In our example we entered IBASampleQueue. Click Next.

    Bus Identifier

  7. Select the Bus member we created before (for example, RADNode:server1) and then click Next.

    Select Bus member

  8. Click Finish.

    New destination

  9. Click Save and then when prompted click Save to Save to Master Configuration.

  10. Log out of the WebSphere Administrative Console.

  11. In order for the changes to take effect, you must restart the application server, in this case server1.

    1. Stop the server1 application server by clicking Start > Programs > IBM WebSphere > Application Server V6 > Profiles > default > Stop server. Alternatively, use the stopServer.bat server1 command.

    2. Start the server1 application server: startServer.bat server1

Verify the messaging engine startup

A messaging engine is a server component that provides the core messaging function of a service integration bus. A messaging engine manages bus resources and allows applications to communicate with the bus.

Each messaging engine is associated with a server that has been added as a member of a bus. When you add an application server as a bus member, a messaging engine is automatically created for this new member. If you add the same server as a member of multiple buses, the server is associated with multiple messaging engines (one messaging engine for each bus). However, in its simplest form a bus can be realized by a single engine.

Messaging engines are given a name, which is based on the name of the bus member. Each messaging engine also has a universal unique identifier (UUID) which provides a unique identity for the messaging engine. If you delete and recreate a messaging engine, it will have a different UUID and will not be recognized by the bus as the same engine, even though it may have the same name. For example, the recreated messaging engine will not be able to access the data store that the earlier instance used. If you accidentally delete a messaging engine configuration, and save the updated incorrect configuration, you must restore the configuration from a previous configuration backup.

Each messaging engine has its own data store. A messaging engine uses an instance of a JDBC data source to interact with the database that contains the data store for that messaging engine.

You can stop messaging engines using different mechanisms and with different degrees of urgency. Stopping a messaging engine prevents it from sending any messages.

To verify the messaging engine startup, do the following:

  1. Ensure the server1 application server has been restarted.

  2. Start the WebSphere Administrative Console.

  3. Select Service integration > Buses.

  4. Click IBASampleBus.

  5. Under Additional Properties, click Messaging engines.

  6. You should see the green arrow under Status to note the RADNode.server1-IBASampleBus Messaging Engine has been started.

    Messaging Engine Status

BOOT.BY - Tech Industry News         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     Free SCWCD 1.4 Study Guide     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide     Free SCBCD 5.0 Study Guide