JMS client run time environment
Regardless of the environment on which a JMS client is executing, it will always performs the same steps in order to connect to a JMS provider. These steps are:
- Obtain a reference to a JMS connection factory from the JNDI name space.
- Invoke the createConnection method on the JMS connection factory.
The important point here is that the JMS connection factory object will always execute within the same process as the JMS client. However, the JMS client, and therefore the JMS connection factory, might be executing inside of a WebSphere process, or they might be executing within a stand-alone JVM. In the case of the connection factory for the default messaging JMS provider, the behavior of the connection factory depends on the environment on which it is executing.
- Clients running inside of WAS
When the connection factory is executing within the WAS V6 environment, it is able to communicate with components of the WebSphere run time in order to determine which messaging engines are defined within the specified service integration bus, and where these messaging engines are currently located. The relevant connection properties configured on the connection factory can then be used to select a suitable messaging engine to which to connect.
The connection factory is only able to determine the location of messaging engines that are defined within the same WebSphere cell. If the target bus is defined within another cell, then a list of suitable provider endpoints must be configured on the connection factory.
- Clients running outside of WAS
When the connection factory is executing outside of the WAS V6 environment, or in a WAS V6 environment on a different cell to the target bus, it is not able to determine which messaging engines are defined within the specified service integration bus or where they are currently located. In order to obtain this information, the connection factory must connect to an appserver within the same cell as the target bus. This appserver is known as a bootstrap server.
A bootstrap server is simply an ordinary appserver that is running the SIB service. The SIB service is the component within an appserver that manages the service integration bus resources for that appserver. It is the SIB service that enables an appserver to act as bootstrap server for default messaging JMS provider connection factories. However, while the bootstrap server needs to be running the SIB service, it does not necessarily need to be hosting any messaging engines. This is shown in Figure 8-47.
Use the provider endpoints property to configure the bootstrap servers to which a connection factory can connect.