The cost of creating a connection from a WebSphere application Server to a Java message Service (JMS) provider, such as WebSphere MQ, is very high both in terms of time and processor requirements. To improve performance, WebSphere application Server maintains an idle connection pool that provides idle connections to applications when the application requests a connection to a JMS provider. This two-part article will explain how this JMS connection pool is connected. Part 1th describes what happens when the application creates a JMS connection, how to use the free pool, and how to clear the connection in the pool. Part 2nd describes what happens to JMS connections when errors are detected, how to configure the pool to handle multiple simultaneous connection requests, and how the application server manages JMS to WebSphere MQ connections.
Introduction
To improve performance, Ibm®websphere®application Server maintains a connection pool to a JMS provider. When an application creates a JMS connection, the application server looks at whether the connection already exists in the free connection pool--if there is a connection in the pool, it is returned to the application. Otherwise, a new connection will be created. But what is the actual working principle of the idle connection pool.
Part 1th of this two-part series will describe how to use the free connection pool, how to manage the pool content, and how the various properties of the pool work together.
JMS Connection Pool
In general, a connection pool is an idle connection pool to a JMS provider. JMS contains a connection factory concept that can be used to create a connection to a JMS provider using a connection factory. WebSphere application Server has a limit to the number of connections that can be created by the connection factory, which is specified by the maximum Connection property of the connection factory. The default value for this property is 10, which means that you can create up to 10 connections at a time from the connection factory.
Each factory has an associated free connection pool. The connection pool is empty when the application server is started. The maximum number of connections that can exist in a factory's free pool is also specified by the Maximum Connection property. Figure 1 shows a JMS connection pool on an application server that defines three JMS connection factories:
This article is from: IBM developerWorks China
Please click here to view the full text