Configuring WebSphere Application Server V5 to run both WebSphere MQWorkflow Web Client and WebSphere Business Integration Monitor

This article describes how to configure WebSphere Application Server V5 to run both WebSphere MQWorkflow Web Client and WebSphere Business Integration Monitor on the same application server. This is necessary because WebSphere Application Server V5 supports only one application server (unless you are using WebSphere Application Server V5 ND) and because the MQWorkflow Web Client Java API uses a JNI library that is loaded once by the application server.

Wolfgang Kulhanek (kulhanek@us.ibm.com), IBM Worldwide Technical Sales Leader for WebSphere Business Integration Server, IBM, Software Group

Photo: Wolfgang KulhanekWolfgang Kulhanek is the Worldwide Technical Sales Leader for WebSphere Business Integration Server with IBM's Software Group and an IBM certified IT Specialist. He has been working with IBM's process integration products for more than 10 years in both development and sales roles and is the author of various WebSphere MQ Workflow SupportPacs.



07 July 2004

Introduction

This article describes how to configure WebSphere® Application Server V5 to run both WebSphere MQWorkflow Web Client (herafter called the Web Client) and WebSphere Business Integration Monitor (hereafter called the Monitor) on the same application server. The article refers to the following software versions and platforms:

  • WebSphere MQWorkflow 3.5
  • WebSphere Business Integration Monitor 4.2.4
  • WebSphere Application Server 5.0
  • Microsoft® Windows® (NT/2000/XP)
  • Unix (Sun® Solaris®)
  • AIX®

Notes:

  • WebSphere Business Integration Monitor 4.2.4 does not support WebSphere Application Server 5.1 yet.
  • Install the latest FixPack for WebSphere Business Integration Monitor before deploying the application. At press time, this was FixPack 2.

The problem

This article provides configuration because WebSphere Application Server V5 is using just one application server. While you can create more then one application server on one box, it is not easy to maintain. This article does not apply to WebSphere Application Server V5 ND. The ND edition fully supports the creation and management of multiple application servers.

Prior to WebSphere Application Server V5, WebSphere MQWorkflow Web Client and WebSphere Business Integration Monitor were deployed into different application servers. This approach was taken because the WebSphere MQWorkflow Java API, which is being used in both the Web Client and the Monitor, is implemented through a Java Native Interface (JNI) wrapper that calls into a C Library. According to the J2EE specification, you can load a native shared library once by an application server. Therefore, the two applications are deployed in two different application servers.

In WebSphere Application Server V5, one application server is shared. Therefore, an error is displayed as soon as the second of the two Web applications (Web Client, WBI Monitor) is used. The error message displayed when trying to log on looks similar to the one below. The error message is displayed either in the Web Client or in the Monitor, whichever application is being accessed second. In this example, it is the Monitor.

java.lang.UnsatisfiedLinkError: Native Library 
C:\MQWF\BIN\fmcojprf.dll already loaded in another classloader

The solution

The solution is to make sure that the WebSphere MQWorkflow Java API DLLs are loaded exactly once from the application server by defining the API globally for the entire application server.

  1. Configure the application server to load the WebSphere MQWorkflow Java APIs globally.
  2. Remove any references to this library in the WebSphere MQWorkflow Web Client Web application. Note that these two steps are only necessary on WebSphere MQWorkflow versions prior to version 3.5.
  3. Configure the WebClient.properties file to use the default configuration ID.
  4. Remove any references to this library from the WBI Monitor Web application.

Configuring the application server

To configure the application server:

  1. Make sure that WebSphere Application Server is started.
  2. Open the administration console for WebSphere. Open a Web browser and point it to http://localhost:9090/admin.
    Figure 1. Login to Administration Console
    Login to administration console
  3. Log on to the administration console. If you have not configured the security, then you can use any user ID. You are presented with a navigation tree on the left hand side of the window.
  4. If you have installed and configured WebSphere MQWorkflow 3.5, go to Updating the Web Client properties file. WebSphere MQWorkflow 3.5 sets the application server classpath correctly. Note that you need to re-deploy the Web Client if you upgraded from any version prior to 3.5. In this navigation tree, open Servers/Application Servers, which lists the available application servers (usually only one) on the right hand side.
    Figure 2. Open application servers
    Open application servers
  5. Click on this server (usually server1) to open the server configuration. Scroll all the way down to see the various sub sections of the server configuration. Click on Process definition.
    Figure 3. Process Definition
    Process Definition
  6. Again scroll all the way down to see the additional properties. Click on Java Virtual Machine to open the Java VM properties.
    Figure 4. Java Virtual Machine
    Java Virtual Machine
  7. You see a number of entry fields. For the Classpath, type the full path for the WebSphere MQWorkflow Java API JAR file. In this example, it is C:\MQWF\bin\java3400\fmcojagt.jar. Your installation path may vary so use the actual location.
    Figure 5. Classpath
    Classpath
  8. Click the OK button at the bottom of the screen. This concludes this section of the modification.

Configuring the WebSphere MQWorkflow Web Client

Configuring the WebSphere MQWorkflow Web Client is easy. The Web Client deploys the Java API as part of the Enterprise Archive (EAR) file. Therefore, the Java API JAR file is unpacked into the directory into which the EAR file gets unpacked. This directory (for a default workflow configuration) is {WASDIR}\installedApps\{hostname}\MQWF_Web_Client_FMC.ear. FMC is your configuration ID for the Web Client. If you have another configuration ID, then use it. Go to this directory and delete the fmcojagt.jar file.

Updating the Web Client properties file

Because more than one application uses the same instance of the WebSphere MQWorkflow Java API, use the same configuration ID for all applications. If any application tries to set a different configuration ID, an exception displays as follows:

java.beans.PropertyVetoException: FMC38001E Configuration FMC cannot be set
  1. To ensure that the Web Client uses whatever configuration is already set, comment out the section of the configuration file where the configuration is set. Update the WebClient.properties file found in {WASDIR}\installedApps\{hostname}\MQWF_Web_Client_FMC.ear\fmcohcli.war\WEB-INF.
  2. Open the file in a text editor and comment out the following lines:
    AgentName = MQWFAGENT
    AgentLocator = LOC_LOCATOR
    AgentConfiguration = FMC
  3. To comment out these lines, add # at the beginning of the line:
    # AgentName = MQWFAGENT
    # AgentLocator = LOC_LOCATOR
    # AgentConfiguration = FMC
  4. Commenting out the lines tells the Web Client to use its default values. If you see the exception error mentioned above, restart the WebSphere MQWorkflow Web Client Application, not the entire application server.

Configuring the WebSphere Business Integration Monitor

The WebSphere Business Integration Monitor Web application has been configured to use a system-wide variable to point to the WebSphere MQWorkflow Java API library. This library is then referenced in the Web application. To make sure that the Monitor uses the system-wide defined library, delete the association with this system-wide library.

  1. In the WebSphere Administration Console, locate the navigation tree on the left side on the window. Open Applications and click on Enterprise Applications. You see a list of installed enterprise applications on the right side of the pane.
    Figure 6. WebSphere Business Monitor
    WebSphere Business Monitor
  2. Open the configuration for the Monitor by clicking on IBM_WBI_Monitor. Scroll down all the way to the additional properties and click on Libraries.
    Figure 7. Libraries
    Libraries
  3. You are presented with a list of all libraries that are referenced by this Web application. Select the checkbox next to MQ_LIBRARY and click on the Remove button to remove this reference.
    Figure 8. Library Reference
    Libraries Reference
  4. Save this configuration by clicking Save at the top of the "Messages" section of this current Web page.
    Figure 9. Saving the configuration
    Saving the configuration
  5. Confirm the prompt by clicking on the Save button again.
  6. Log off from the administration console and restart (stop/start) the application server from the services panel. Once the application server has been restarted, you can log on to both the WebSphere MQWorkflow Web client and the Monitor.

Conclusion

This article showed how to configure the WebSphere Application Server so that it can run both the WebSphere MQWorkflow Web Client and the WebSphere Business Integration Monitor at the same time. This allows a less resource intense environment with just one application server. You can use this approach to extend any application that uses the WebSphere MQWorkflow Java APIs from WebSphere Application Server. Examples include the WebSphere MQWorkflow Web Services Toolkit or the WebSphere MQWorkflow Generic Java UPES.

Resources

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into WebSphere on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=WebSphere
ArticleID=14650
ArticleTitle=Configuring WebSphere Application Server V5 to run both WebSphere MQWorkflow Web Client and WebSphere Business Integration Monitor
publish-date=07072004