206 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
8.4 The buy shares scenario
During the buy shares scenario, after the Stock Analysis service validates the
stock request, a system process makes a request to retrieve the stock
information. The stock information is retrieved from the database repository for
the trading system to use in a risk and profile evaluation.
8.5 Developing the adapter-based EIS service
The artifacts required to build this solution are the WebSphere Business
Integration Adapter for JDBC and the Adapter Framework. The WebSphere
Business Integration System Manager 4.2.2 is used to create the WebSphere
Application Server project and the adapter business objects. Business Process
Choreographer is used to create the business process which wraps this service.
DB2, WebSphere Business Integration Server Foundation, and WebSphere MQ
5.3 are also used.
Details of the software artifacts and the versions that we used are:
???? WebSphere Business Integration Adapter for JDBC Version 2.5.0
???? WebSphere Business Integration Adapter Framework Version 2.4.0
???? WebSphere Business Integration Tools
WebSphere Business Integration System Manager Version 4.2.2 installed
with the Adapter Framework
WebSphere Business Integration Connector Configurator Version 4.2.2
WebSphere Business Integration Business Object Designer Version 4.2.2
???? WebSphere Studio Application Developer Integration Edition Version 5.1.1
???? WebSphere Business Integration Server Foundation Version 5.1
???? WebSphere MQ 5.3 CSD07
???? IBM DB2 Universal Database™ Version 8.1.0.36
There are several steps involved in developing the service:
1. Installing and configuring DB2.
2. Configuring WebSphere MQ.
3. Creating the business objects using the JDBC ODA.
4. Building and exporting the adapter project.
5. Exposing the adapter as a service.
6. Creating and configuring the integrated test environment (ITE).
Chapter 8. Integration using WebSphere Business Integration Adapters 207
The next sections explain how to create the service. In these sections, we refer
to the JDBC adapter guide found at:
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp
8.5.1 Installing and configuring the DB2 software
The database that we used was IBM DB2 UDB Version 8.1.0.36.
Table 8-1 shows the structure of the stock quote analysis data. The database
name is STOCKSYS, and the table is name StockInfo.
Table 8-1 Structure of the stock quote analysis data
8.5.2 Configuring WebSphere MQ queue manager and queues
You need to create the queue manager, queues, and channels that the JDBC
Adapter uses. You also need to create the WebSphere MQ JMS provider Queue
Connection Factory.
1. Create a queue manager called ITF using the WebSphere MQ Explorer.
2. Expand the Advanced
Channels folders. Right-click Channels and
choose New
Server Connection Channel. Name the channel and click
OK.
3. Open a command line and execute the following command using the text file
shown in Example 8-1 on page 208.
runmqsc ITF < configure_mq.txt
Column Name Type
Symbol VARCHAR(4)-Not Null and Primary Key
Value VARCHAR(10)
Trend INTEGER- Default 0, valid values -1,0,1
Change VARCHAR(10)
High VARCHAR(10)
Low VARCHAR(10)
Company VARCHAR(60)
208 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
Example 8-1 Create queues text script
DEFINE QLOCAL(JDBCADAPTER/ADMININQUEUE)
DEFINE QLOCAL(JDBCADAPTER/ADMINOUTQUEUE)
DEFINE QLOCAL(JDBCADAPTER/DELIVERYQUEUE)
DEFINE QLOCAL(JDBCADAPTER/FAULTQUEUE)
DEFINE QLOCAL(JDBCADAPTER/REQUESTQUEUE)
DEFINE QLOCAL(JDBCADAPTER/RESPONSEQUEUE)
DEFINE QLOCAL(JDBCADAPTER/SYNCHRONOUSREQUESTQUEUE)
DEFINE QLOCAL(JDBCADAPTER/SYNCHRONOUSRESPONSEQUEUE)
8.5.3 Creating the business object using the JDBC ODA
Next, you create the business object by running the JDBC ODA on the stock
brokerage database (STOCKSYS).
Starting the JDBC ODA
For more information, refer to the JDBC guide found at:
http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp
Configure the start_JDBCODA.bat file to include the DB2 library files:
1. Modify the DRIVERPATH variable in the script to include the
<db2install>javadb2java.zip file.
2. Modify the DRIVERLIB variable to include the <db2install>in directory.
Example 8-2 shows the JDBC ODA script with the correct variable values
appended or inserted in the script.
Example 8-2 JDBC ODA script variables
set DRIVERPATH=”%CROSSWORLDS%”inxwutil.java;...;”C:Program
FilesIBMSQLLIBjavadb2java.zip
set DRIVERLIB=”C:Program FilesIBMSQLLIBin”
3. Start the JDBC ODA by clicking Start Programs IBM WebSphere
Business Integration Adapters
Adapters Object Discovery Agents
JDBC Object Discovery Agent.
The JDBC Object Discovery Agent is now ready for use by the Business Object
Designer.
Chapter 8. Integration using WebSphere Business Integration Adapters 209
Creating the WebSphere Application Server project
You create a WebSphere Application Server project to hold the connector
component and its associated business objects. You then export this project as a
service for that you can import into a service project later on.
1. Start system manager by clicking Start
Programs IBM WebSphere
Business Integration Adapters
Adapters Tools System
Manager.
2. Create a WAS Project by right-clicking the WAS Projects folder and name it
JDBCAdapter.
3. Create an Integration Component Library (ICL) and name it JDBC.
Figure 8-3 shows the created ICL and the WebSphere Application Server
project.
Figure 8-3 View WebSphere Application Server project and ICL JDBC project
210 Managing Information Access to an EIS Using J2EE and Services Oriented Architecture
4. Right-click the Business Objects folder and click Create New Business
Object.
The WebSphere Business Integration Business Object Designer tool
launches. You use this tool to create the business object to be used, which
represents the StockInfo table to the adapter and its clients.
5. Click File-New Using ODA... to create the business object using the JDBC
ODA.
6. On the Business Object Wizard Step 1 page, click Find Agents. After the
agent appears, you can click Cancel or wait for it to finish.
7. Select JDBCODA agent from the located agents list, then click Next.
Figure 8-4 shows the designer with the agent found on our test machine and
the details of the port on which it is running.
Figure 8-4 Business Object Wizard- Find Agent
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset