UNIX and Linux: Migrating IBM WebSphere MQ library loading from Version 7.0.1 to Version 7.5
Investigate whether applications connecting to IBM® WebSphere® MQ for Windows Version 7.5 are linked to, and load libraries from, the correct installation.
Before you begin
Read Multi-installation queue manager coexistence on UNIX, Linux, and Windows and Migrating IBM WebSphere MQ library loading from Version 7.0.1 to Version 7.5 before starting this task.
Plan and install IBM WebSphere MQ for Windows Version 7.5, and remember the installation name and whether the installation was set to primary.
About this task
In Version 6.0 and Version 7.0.1, the documented build procedure for IBM WebSphere MQ applications is to include an explicit library path to the location of the IBM WebSphere MQ libraries, and to /usr/lib, in the link step of the compiler; see Figure 1. The same build procedure is documented for Version 7.5. Previous versions of IBM WebSphere MQ, before Version 6.0, did not document a specific location to load run time libraries from.
Scenario |
Version 7.5 replaces Version 7.0.1 in the same location
|
Version 7.5 replaces Version 7.0.1 in a different location
|
Version 7.5 alongside Version 7.0.1
|
|
---|---|---|---|---|
Action |
||||
setmqinst |
setmqinst makes the Version 7.5 installation primary. Symbolic links to the IBM WebSphere MQ link libraries are inserted into /usr/lib. |
No Version 7.5 installation can be primary, because Version 7.0.1 is installed. |
||
No other configuration actions |
Library loading works correctly. Library loading works, even without the Version 7.5 installation
being made primary, because the libraries are installed in /opt/mqm/lib and the application was built with the link
option, |
Library loading works correctly. Library loading works, because the installation is primary, and the
application was built with the link option, |
The library loading continues to work with Version 7.0.1 correctly, nothing works with Version 7.5. |
|
setmqenv, without setting the -k or -l options. |
Library loading works correctly. setmqenv is unnecessary. Library loading works,
because the libraries are installed in /opt/mqm/lib and the application was built with the link option, |
Library loading works correctly. setmqenv is unnecessary. Library loading works,
because the installation is primary, and the application was built
with the link option, |
The library loading continues to work with Version 7.0.1 correctly, nothing works with Version 7.5. |
|
setmqenv, with the -k or -l options set. |
Library loading works correctly. |
Library loading works correctly, both for Version 7.0.1 and Version 7.5. The correct Version 7.0.1 is loaded, because the Version 7.5 library loads the Version 7.0.1 library for queue managers that have not been migrated from Version 7.0.1. |
||
The operating system finds
the IBM WebSphere MQ library
location set by setmqenv. setmqenv adds the location to |
Procedure
- If you have a multiple Version 7.5 installations to load from on a server, IBM WebSphere MQ checks that the installation the library was loaded from is the installation that is associated with any queue manager the application calls. IBM WebSphere MQ loads the correct library if the wrong library is loaded. It is necessary to configure only one runtime environment for all IBM WebSphere MQapplications.
- A typical choice is to set the primary installation. Setting an installation to be primary places symbolic links to the IBM WebSphere MQ libraries in /usr/lib. Applications built following the Version 6.0 or Version 7.0 instructions have an explicit link to /usr/lib. /usr/lib is also normally in the default library search path.
- If you upgraded a Version 7.0.1 installation to Version 7.5, a link path to the Version 7.0.1 installation now points to a Version 7.5 installation. Applications that have a fixed linkage path to the Version 7.0.1 installation now load the Version 7.5 libraries. They are then switched to the installation that is associated with any queue manager they connect to.
- If you rebuild an application, it must link to a Version 7.5 installation.
- If you set
LD_LIBRARY_PATH
, orLIBPATH
on AIX, you must check that the application is able to useLD_LIBRARY_PATH
.setuid
orsetgid
, applications, or applications built in other ways, might ignoreLD_LIBRARY_PATH
for security reasons.
What to do next
If you add further Version 7.5 installations, you must decide which installation to make primary, if you have chosen to make any primary. As long as applications load IBM WebSphere MQ libraries from one of the Version 7.5 installations, such as the primary installation, they can connect to queue managers associated with any other Version 7.5 installation.