WebSphere Business Integration Monitor now has the capability to display data from relational databases alongside information from WebSphere MQ Workflow. This includes setting up a JDBC Data Source in WebSphere Application Server, defining a Database Metric in the WebSphere Business Integration Monitor as well as finally defining the business measure to use this metric.
This document is relevant to the following software versions:
- WebSphere Business Integration Monitor V4.2.4
- WebSphere Application Server V5.0
The example that has been used in this document is the WA82 SupportPac -- also known as WebCredit Example. This example includes a DB2 customer/loans database.
Configuring WebSphere Application Server
To begin, you can create a JDBC Data Source in the WebSphere Application Server. This data source points to the DB2 database from which you want to pull data.
Make sure that WebSphere Application Server is started. Then open the administration console for WebSphere (open a Web browser and point it to http://localhost:9090/admin).
Figure 1. WebSphere Administration Console Login screen
Log on to the administration console (if you haven't configured security, then you can use any user ID). You will be presented with a navigation tree on the left-hand side of the window. In this navigation tree, open "Resources/JDBC Providers" to list all available JDBC providers. At least two providers are defined; these providers have been defined by the WebSphere Business Integration Monitor for internal use.
Creating a new provider for the database
Now, let's create a new provider for the database.
- From the WebSphere Application Server Administrative Console, navigate to the Resources/JDBC Providers screen and click New (See Figure 2 below):
Figure 2: Adding a new JDBC Provider
This opens the following screen (see Figure 3):
Figure 3. Specify the type of the JDBC Provider
- Select DB2 Legacy CLI-based Type 2 JDBC Driver as your JDBC Provider. Click OK. This opens the configuration screen for this JDBC Provider (see Figure 4).
Figure 4. Specify settings for the JDBC Provider
- Specify a Name ("CustomerDriver" in this example). Description is optional, but generally a good idea.
- Use the actual path to your JDBC library (in this example
C:\IBM\SQLLIB\java\db2java.zip) for the Classpath. - Click Apply. This creates this JDBC Provider.
- Scroll down and select Data Sources (Version 4) to create the actual data source within this provider.
Figure 5. Creating a new data source (Version 4)
This opens the configuration dialog for data sources.
Figure 6. Specify settings for the JDBC Provider
Now you can define your database connectivity. - Specify a Name and JNDI Name for this data source. Make a special note of the JNDI Name. This is the name that you will be using in the WebSphere Business Integration Monitor to access this database.
- Add a description.
- Specify the Database Name, Default User ID, and Default Password.
- Click Apply. It is also always a good idea to test the database connection by clicking on Test Connection, which can be found on top of this screen. This checks that WebSphere Application Server can load the JDBC classes and that it can access this database using the credentials provided.
- Click OK, when the connection works.
- Save the configuration changes to the master configuration by following the prompts that the administration console provides.
This concludes the configuration part in WebSphere Application Server.
Configuring WebSphere Business Integration Monitor database metrics
The database metrics need to be defined in the WebSphere Business Integration Monitor. The WebSphere Business Integration Workbench does not yet have functionality to create database metrics. If you are using database metrics, you will have to be careful when updating the process model in the Workbench as new process model imports will overwrite any changes you made in the Monitor's Business Measure Editor.
Log on to the WebSphere Business Integration Monitor, and in the Business Measures Editor, navigate to "Database Metrics" (see Figure 7).
Figure 7. Database Metric Properties in WebSphere Business Integration Monitor
- From the Process list box, select the process for which you want to define this database metric ("WebCreditRequest" in this example).
- Type the name for the data source. Remember that this is the JNDI name that you specified in WebSphere Application Server for this database ("CustomerDatabase"in this example).
- Select a valid datatype for the SQL query that you will be writing ("String" in this example).
- Type your SQL Query to actually retrieve the value from the database. This query has to return exactly one row. If it returns more than one row, then only the first row is used. You can use other existing business measures in the query. Figure 7 above uses the business measure "M_LoanID" to uniquely identify a row in the table. This is where you link the data from the business process with the data in the database.
- Before you save this query, make sure to click Validate. If validation succeeds, click Save As and specify a name (in this example "DM_Status") for the database metric. In accordance to WebSphere Business Integration naming conventions, we prefix database metrics with "DM" to make them distinguishable form other types of metrics (like data fields metrics).
- From the navigator on the left, select Business Measures to create a new business measure that will be using this database metric.
Figure 8. Using the database metrics in a Business Measure
- From the process list box, select the process ("WebCreditRequest"), Location (which you will have to define. This example captures the database metric before starting -- LBS -- the Update_Loans activity), and finally the metric (DM_Status) you want to use.
- Click Save As and specify a name (in this example "M_Status") for the new Business Measure.
This is all that you have to do to create a database business metric.
This article demonstrated how to set up the JNDI Data Sources in WebSphere Application Server and how to configure WebSphere Business Integration Monitor to access data in databases described in these Data Sources. You can now add these business metrics to your business monitoring solution.
- SupportPac WA82: Web Credit Example
- WebSphere Business Integration Monitor Web site
- WebSphere MQ Workflow Web site

Wolfgang 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.
Comments (Undergoing maintenance)





