Multiple installations and application programs
When a local application connects to a queue manager, the application needs to load the libraries from the installation associated with the queue manager. Multiple installations introduce some complexity.
Use the setmqm command
When we use setmqm to change the installation associated with a queue manager, the libraries that need to be loaded change.
When an application connects to multiple queue managers owned by different installations, multiple sets of libraries need to be loaded. Note: If you link our applications to IBM® WebSphere MQ Version 7.1 or later libraries, the applications automatically load the appropriate libraries when the application connects to a queue manager.
Loading IBM MQ libraries in a multi-version environment
How libraries are located depends upon your environment.
If IBM WebSphere MQ Version 7.1 or later is installed in the default location, existing applications continue to work as before. Otherwise, you might need to rebuild the application or change your configuration.
The order in which libraries are searched, depends upon the platform you are using:
- Windows
- The application's directory
- The current directory
- The global and your PATH variables
- Other platforms
- LD_LIBRARY_PATH (or LIBPATH/SHLIB_PATH)
- An embedded search path (RPath)
- The default library path
Table 1. Options for loading libraries Platform Option Benefits Drawbacks UNIX Set/change the embedded runtime search path (RPath) The path is explicit in the way the application is built You need to recompile and link If you move IBM MQ, you must change RPath
UNIX Set LD_LIBRARY_PATH or equivalent using setmqenv Overrides RPath No changes to existing applications
Easy to change if you move IBM MQ
Depends on environment variables Possible impacts on other applications
Windows Set PATH using setmqenv No changes to existing applications Easy to change if you move IBM MQ
Depends on environment variables Possible impacts on other applications
All Set the primary installation to IBM WebSphere MQ Version 7.1 or later No changes to existing applications Easy to change the primary installation
Similar behavior to previous versions of IBM MQ
While IBM WebSphere MQ Version 7.0.1 is installed, we cannot make IBM WebSphere MQ Version 7.1 the primary installation UNIX: Relies on /usr/lib in the default search path