bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Developing Adapters

Creating an Adapter Not Specific to WebLogic Integration

The procedures for developing J2EE-compliant adapters outlined in Developing a Service Adapter, and Developing an Event Adapter, primarily pertain to adapters developed for use with WebLogic Integration. By making modifications to the procedures described in those chapters, you can build an adapter that complies with the J2EE Connector Architecture specification but is not specific to WebLogic Integration.

This section describes those modifications. Specifically, it provides information about the following subjects:

- Using This Section

- Building the Adapter

- Updating the Build Process

Using This Section

This section shows you how to modify the procedure for developing a J2EE-compliant adapter in order to build one that is not specifically designed to run with WebLogic Integration. Each step in this section refers to a corresponding step in Developing a Service Adapter, and describes how to modify that step. You should understand each step thoroughly before proceeding with the modifications described here.

Building the Adapter

This procedure is based on the assumption that you have installed WebLogic Integration as described in Installing BEA WebLogic Integration.

1. Identify the requirements for your development environment as described in Step 1: Research Your Environment Requirements in Developing a Service Adapter.

2. Run GenerateAdapterTemplate, as described in Creating a Custom Development Environment.

3. Assign a logical name to the adapter, as described in Step 2b: Assign the Adapter Logical Name.

4. Implement the SPI, as described in Basic SPI Implementation. You must extend the following classes:

   - AbstractManagedConnectionFactory (described in ManagedConnectionFactory)

   - AbstractManagedConnection (described in ManagedConnection)

   - AbstractConnectionMetaData (described in ManagedConnectionMetaData)

   As you implement these classes, remember you should not implement the ConnectionManager interface; the adapters you are developing here are managed adapters (that is, they are designed to be plugged in to WebLogic Server).

5. Extend AbstractConnectionFactory.

Updating the Build Process

In addition to the procedure provided in Building the Adapter, you need to modify the build.xml file to create an adapter that is not specific to WebLogic Integration. To update the build process, do the following:

1. In your code editor, open the ADK's build.xml file.

2. See Step 2c: Set Up the Build Process. This step includes a section called build.xml Components. In that section, the contents of the build.xml file are shown in a set of code listings.

3. Find Listing 6-12 and Listing 6-13.

4. Remove the code shown in those listings from the adapter's build.xml file.