IBM MQ classes for JMS object pooling
Use a form of connection pooling outside of Java EE helps to reduce overall load resulting, for example, from some stand-alone applications using frameworks, or being deployed into cloud environments, and also from a greater number of client connections into QueueManagers leading to an increase in server consolidation of applications and queue managers
Within the Java EE programming model, there is a well defined life cycle of the various objects in use. Message-driven beans (MDBs) are most constrained, whilst Servlets provide more freedom. Therefore, the pooling options that are available within the Java EE servers suit the various programming models used.
With Java SE (or with another framework such as Spring) the programming models are extremely flexible. Therefore a single pooling strategy does not suit all. We should consider if there is going to a framework in place that could do any form of pooling, for example, Spring.
The pooling strategy to use depends on the environment in which the application is running.
- Object pooling in a Java EE environment
Java EE application servers provide connection pooling functionality that can be used by message-driven bean applications, Enterprise Java Beans and Servlets. - Object pooling in a Java SE environment
With Java SE (or with another framework such as Spring) the programming models are extremely flexible. Therefore a single pooling strategy does not suit all. We should consider if there is a framework in place that could do any form of pooling, for example, Spring.
Parent topic: Accessing IBM MQ features from an IBM MQ classes for JMS application