In Scenario 2, you will set adapter connection properties and generate business objects. You will export your project to an enterprise application archive (EAR) file, deploy the project on the application server, and reset configuration properties.
For details, refer to the WebSphere Integration Developer user guide at http://www.ibm.com/software/integration/wid.
In WebSphere Integration Developer, go to the Business Integration perspective. Right click in the Business Integration pane. Select New > Module. In the New Module window, enter JDBC for the Module Name. Click Finish.
In WebSphere Integration Developer, select File > Import to import the adapter RAR file. The RAR file is jdbc/deploy/CWYBC_JDBC.rar.
In the Select window, select RAR file as the import source.
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 selected. In the EAR project field, select JDBCApp. Click Finish.
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.
Open the WebSphere Process Server administrative console. In the left panel, select Security > Global security. 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. Type an alias name in the Alias field. Enter a user ID and password that can connect to the database. Click OK. Click Save to save the authentication information.
Metadata discovery connection properties
Property | Example Values |
---|---|
UserName | db2admin |
Password | xxxxxxxxxxx |
DatabaseURL | jdbc:db2:mytestdb |
JDBCDriverClass | COM.ibm.db2.jdbc.app.DB2Driver |
Click Next.
After configuring the connection properties, you can run a query for database objects. You can browse the metadata tree structure to understand the structure of objects in the enterprise information system (EIS), and make selections of objects needed for the service description.
At this point you could specify Filter Properties to narrow the list of schemas displayed in the tree structure. See the procedure for specifying filter properties in "Querying for database objects."
In the Find and Discover Enterprise Services window, click Run Query.
The metadata objects are displayed in the top pane. Highlight an object to generate from and click Add . The selected object appears in the bottom pane. You can remove any selected object by clicking Remove.
When you are finished selecting objects, click Next.
After you have selected database objects, you need to specify values for the Selection properties for the import and export files.
The NameSpace property is initially set to a default value for all business objects.
Selecting the Service Type (inbound or outbound) and corresponding operations are described in "Setting Selection properties." After specifying these selection properties, click Next.
The module name JDBC automatically appears in the Generate Artifacts window. Do not change the check box setting. Click New to create a new Business Integration module where the artifacts will be saved.
In the New Module window, the module name appears. A default folder name is selected. This is where the Service Descriptions will be saved.
In the J2C Authentication Data Entry field, type the name of the authentication alias you created earlier.
Click Finish.
You can compare your output to the sample files. In the Business Integration perspective at the Business Integration pane, click + next to the JDBC module to expand it. Click + next to the Data Types folder to view a list of all the business objects.
Your project file is a J2EE Connector project in your workspace in WebSphere Integration Developer. You need to export it to your local file system. Then, you need to provide authentication information for JCA connector security before you upload and install the EAR file on the application server.
From the WebSphere Integration Developer Export screen in the Select window, select the EAR file JDBCApp and click Next.
In the EAR Export window, you need to select the business integration module and the location where the EAR file should be created. Select the module in the EAR project field. Enter or browse to the location where you want the EAR file to be created. Click all the check boxes and click Finish.
Using the administrative console, on the left pane select Applications > Install New Application. 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 for Use default method, 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 in the Enterprise Applications pane, click Save.
The adapter properties for UserName, Password, DatabaseURL and JDBCDriverClass are already set to default values, but you must reconfigure them to match your database instance, using the administrative console.
For inbound processing, you need to modify the J2C activation specification properties. For outbound processing, you need to change the J2C connection factory properties. The sample does not require that you reconfigure values for any additional properties. You can also change Resource adapter configuration properties to the settings you prefer. For details on these properties, see the "Configuration" properties in the "Reference" section.
In the administrative console, at the Configuration tab of the Enterprise Applications window, click the name of your adapter project. Under the Related Items heading, select Connector Modules. The project RAR filename is displayed. Click the check box next to the file name.
At the Configuration tab, under the Additional Properties heading, select Resource Adapter.
Your adapter project is displayed under Name in the General Properties pane. Under Additional Properties, click one of the property categories--either J2C activation specification, J2C connection factory, or Custom properties--to edit the property values. Custom properties are the Resource adapter properties.
Next you can run the sample application.
Last updated: Thu Mar 23 13:24:31 2006
(c) Copyright IBM Corporation 2005.
This information center is powered by Eclipse technology (http://www.eclipse.org)