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. You 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 our application is running.