beautypg.com

Testing the adapter in unmanaged mode – IBM WebSphere Adapters User Manual

Page 200

background image

To test the enterprise metadata discovery (EMD) implementation for the developed
resource adapter, complete the following steps:
1.

From the IBM WebSphere Adapters Foundation Classes library, copy the
following three dependent jars into the connectorModule connector project:

v

commonj.connector.jar

v

CWYBS_AdapterFoundation.jar

v

DESPI.jar

Displaying the dependent jars

Note:

Alternatively, if you want to export the jars as RAR, you can use the

AFCUtility

tool to place these three jars into the RAR. This tool is available as

WAT plug-in from /plugins/com.ibm.j2ca.wat.afc_6.2.0/AFCUtility.

2.

In the WebSphere Integration Developer window, click Go to the Business
Integration perspective

.

3.

Right-click inside the Business Integration section of the WebSphere Integration
Developer window.

4.

Type in a new Module Name in the New Module window. Click Finish.

5.

Open the external service by clicking the File->New->External Service.

6.

In the External service window, expand Adapters and select the adapter name
entered in the ra.xml file.

Note:

You can enter the adapter name in the ra.xml file using the Resource

Adapter Deployment Descriptor editor.

7.

Click through Next to open the last External service window. Click Browse and
select the module created in Step 4 to generate the required artifacts.

Note:

If you do not add the dependency jars to the connectorModule, the

following error might display during the deployment:
java.lang.NoClassDefFoundError: com.ibm.j2ca.base.WBIResourceAdapter

Testing the adapter in unmanaged mode

Testing in unmanaged mode means unit testing the adapter implementation in
your development environment. You can unit test your adapter with JUnit, a
widely used and reliable open source framework for regression testing.

194

WebSphere Adapters: WebSphere Adapter Toolkit User Guide