Connect applications in a multiple installation environment

On UNIX, Linux, and Windows systems, if IBM WebSphere MQ Version 7.1, or later, libraries are loaded, IBM MQ automatically uses the appropriate libraries without we needing to take any further action. IBM MQ uses libraries from the installation associated with the queue manager that the application connects to.

The following concepts are used to explain the way applications connect to IBM MQ:

    Linking
    When the application is compiled, the application is linked to the IBM MQ libraries to get the function exports that are then loaded when the application runs.

    Loading
    When the application is run, the IBM MQ libraries are located and loaded. The specific mechanism used to locate the libraries varies by operating system, and by how the application is built. For more information about how to locate and load libraries in a multiple installation environment, see Loading IBM MQ libraries.

    Connect
    When the application connects to a running queue manager, for example, using a MQCONN or MQCONNX call, it connects using the loaded IBM MQ libraries.

When a server application connects to a queue manager, the loaded libraries must come from the installation associated with the queue manager. With multiple installations on a system, this restriction introduces new challenges when choosing the mechanism that the operating system uses to locate the IBM MQ libraries to load:

  • When the setmqm command is used 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 that are owned by different installations, multiple sets of libraries need to be loaded.

However, if IBM WebSphere MQ Version 7.1, or later, libraries, are located and loaded, IBM MQ then loads and uses the appropriate libraries without we needing to take any further action. When the application connects to a queue manager, IBM MQ loads libraries from the installation that the queue manager is associated with.

Figure 1. Connecting applications in a multiple installation environment
For example, Figure 1 shows a multiple installation environment with a Version 7.0.1 installation ( Installation0), and a Version 7.1 installation ( Installation1). Two applications are connected to these installations, but they load different library versions.

Application 1 directly loads a Version 7.0.1 library. When application 1 connects to QM2, the Version 7.0.1 libraries are used . If application 1 attempts to connect to QM1, or if QM2 is associated with Installation1, application 1 fails with a 2059 (080B) (RC2059): MQRC_Q_MGR_NOT_AVAILABLE error. The application fails because the Version 7.0.1 library is not capable of loading other library versions. That is, if Version 7.0.1 libraries are directly loaded, we cannot use a queue manager associated with an installation at a later version of IBM MQ.

Application 2 directly loads a Version 7.1 library. When application 2 connects to QM2, the Version 7.1 library then loads and uses the Version 7.0.1 library. If application 2 connects to QM1, or if QM2 is associated with Installation1, the Version 7.1 library is loaded, and the application works as expected.

Migration scenarios and connecting applications with multiple installations is considered in more detail in Multi-installation queue manager coexistence on UNIX, Linux, and Windows.

For more information about how to load IBM WebSphere MQ Version 7.1 libraries, see Loading IBM MQ libraries.


Support and restrictions

If any of the following Version 7.1, or later, libraries, are located and loaded, IBM MQ can automatically load and use the appropriate libraries:

  • The C server libraries
  • The C++ server libraries
  • The XA server libraries
  • The COBOL server libraries
  • The COM+ server libraries
  • .NET in unmanaged mode

IBM MQ also automatically loads and uses the appropriate libraries for Java and JMS applications in bindings mode.

There are a number of restrictions for applications using multiple installations. For more information, see Restrictions for applications using multiple installations.

  • Loading IBM MQ libraries
    When deciding how to load IBM MQ libraries, we need to consider a number of factors, including: the environment, whether we can change your existing applications, whether we want a primary installation, where IBM MQ is installed, and whether the location of IBM MQ is likely to change.
  • Restrictions for applications using multiple installations
    There are restrictions when using CICS server libraries, fast path connections, message handles, and exits in a multiple installation environment.
  • Connect .NET applications in a multiple installation environment
    By default, applications use the .NET assemblies from the primary installation. If there is no primary installation, or we do not want to use the primary installation assemblies, we must update the application configuration file, or the DEVPATH environment variable.

Parent topic: Configure multiple installations


Related concepts


Related tasks


Related information