For Scenario 1, the sample provides all of the artifacts so that
you don’t need to use the enterprise service discovery wizard to create them.
The sample provides an instance of the adapter that is already
configured. In the following procedure, you need to update the business object
application-specific information (ASI) to match your environment. And you
need to change the values of the configuration properties to match the database
instance in your enterprise information system (EIS).
- Start WebSphere(R) Integration Developer
For
details, refer to the WebSphere Integration Developer user guide at http://www.ibm.com/software/integration/wid.
- Create the business integration module
In WebSphere
Integration Developer, go to the Business Integration perspective. Right
click in the Business Integration pane. Click New > Module.
In the New Module window, enter JDBC for the Module
Name. Click Finish.
- Import the Resource Adapter Archive (RAR) file
- Click File > Import. In the Select window,
select RAR file as the import source and click Next.
This imports CWYBC_JDBC.rar into WebSphere Integration Developer.
- In the Connector Import window, at the Connector
file field, browse to the path and name of the module created
in the previous step, for example, install dir \jdbc\deploy\CWYBC_JDBC.rar.
Ensure that the check box for Add module to an EAR project is
checked. In the EAR project field, select JDBCApp.
Click Finish.
- In the Business Integration perspective, in the Business Integration
pane, right-click on the JDBC project and select Open
Dependency Editor. Click the arrow to expand the J2EE section.
Click Add. In the J2EE(TM) Project Selection
window, select CWBC_JDBC and click OK.From
the menu, click .
- Add JDBC driver to Java build path
You need to add
a reference to the JDBC driver to your project.
In WebSphere Integration
Developer at the Java perspective, right click the CWBC_JDBC Connector
Project. Select Properties.
To
add the external JAR file, click Java Build Path. Select
the Libraries tab and click Add External
Jars. In the File System window, navigate to the JDBC
Driver and select the JAR file.
Click OK to
save your changes.
- Add business object artifacts to the Business Integration module
You need to uncompress the JDBCApp.ear.
Next you need to extract
the JAR file from the enterprise application archive (EAR) file.
From JDBCAPP.ear, extract JDBC.jar to \workspace\JDBC.
- Change the business object application-specific information
- At the Business Integration perspective, right click the JDBC module
and select Refresh.
- Click the + next to Data Types.
Right click the business object InboundRtasserCustomer.xsd.
- Select Open With > Business Object Editor.
Select the Properties tab. Select the Application
Info tab.
- In the ASI Properties pane, change the value of jdbcasi:TableName
from RTASSER.CUSTOMER to schema.CUSTOMER using
the name of the schema in your database where the CUSTOMER table has been
created. From the menu, click File > Save.
Repeat steps 6a through 6d for the following business objects:
- InboundRtasserAddress
- InboundRtasserCustInfo
- OutboundRtasserCustomer
- OutboundRtasserAddress
- OutboundRtasserCustInfo
- Provide authentication information
- You need to create an authentication alias, using the administrative
console of WebSphere Process Server. Open the administrative console. In the
left panel, click . In the Global security window, in the Configuration pane,
go to the Authentication heading on the right side.
Click JAAS Configuration. Then click the J2C
Authentication data link.
- In the window Global security > J2EE Connector Architecture
(J2C) authentication data entries, click New. Enter
an alias name in the Alias field. Enter a user ID and
password that can connect to the database. Click OK.
Then click Save to save the authentication information.
- Change values for configuration properties
- You need to change the configuration property values to match
your database instance. In WebSphere Integration Developer at the Business
Integration perspective in the Business Integration pane, click JDBC
module. Double-click Inbound/JDBCInboundInterface.
- In the assembly editor, at the Properties tab,
click the Binding tab, then click the Connection tab.
- Expand ActivationSpecProperties. Set
the properties UserName, Password, DatabaseURL, and JDBCDriverClass to the
appropriate values for the J2C activation specification, based on your database
configuration.
- In the Connection tab, expand Authentication
Properties. In the J2C Authentication Data Entry
field, enter the name of the authentication alias you created in the previous
step. From the menu, click File > Save.
You need to repeat this procedure for the Outbound/JDBCOutboundInterface
object. Update the values for the J2C connection factory (also called Managed
Connection Factory) properties: UserName, Password, DatabaseURL, and JDBCDriverClass.
- Deploy the project file to the application server
You
need to export the EAR file for your project from WebSphere Integration Developer
to WebSphere Process Server.
- Export the EAR file
From the WebSphere Integration
Developer menu, click File > Import. Select the EAR
file and click Next. In the EAR Export window, go to
the EAR project field and enter JDBCApp.
Set the destination path and filename. Select all three of the check boxes
and click Finish.
- Install the EAR file on the application server
Using
the administrative console, select . Click Browse,
select the EAR file, and click Next.
Keep clicking Next until
you reach Step 7. Map resource references to resources.
Select the authentication alias you created earlier, select the check box
and click Apply .
On the following screens, click Next or Continue until
you see the Summary of Installation Options window. Then click Finish.
You
will see the message Application SampleApp installed successfully.
Click Save to Master Configuration to save your changes.
Then click Save.
Next you can run the sample application.