BEA Logo BEA 

WebLogic Integration Release 2.1 Service Pack 1

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WebLogic Integration Doc Home   |   AI Topics   |   Developing Adapters   |   Previous Topic   |   Next Topic   |   Contents   |   Index   |   View as PDF

Developing Adapters

 

 

Introduction to the ADK

Section Objectives

What is the ADK?

Requirements for Adapter Development

What the ADK Provides

What are Adapters?

Service Adapters

Event Adapters

J2EE-Compliant Adapters Not Specific to WebLogic Integration

The Design-Time GUI

The Application View

The Packaging Framework

Before You Begin

 

Concepts

Run Time Versus Design Time

Run-Time Framework

Design-Time Framework

Events and Services

Events

Services

Logging

The Logging Toolkit

The Logging Framework

Internationalization and Localization

Adapter Logical Name

Where the Adapter Logical Name is Used

In Adapter Deployment

As an Organizing Principle

As the Return Value for getAdapterLogicalName()

Enterprise Archive (.ear) Files

 

Tools

Sample Adapter

Why Use the Sample Adapter?

What's In the Sample Adapter

The GenerateAdapterTemplate Utility

ADK Javadoc

Ant-Based Build Process

Why Use Ant?

XML Tools

 

Creating a Custom Development Environment

Adapter Setup Worksheet

Using GenerateAdapterTemplate

Step 1. Execute GenerateAdapterTemplate

Step 2. Rebuild the Tree

Step 3. Deploy the Adapter to WebLogic Integration

 

Using the Logging Toolkit

Logging Toolkit

Logging Configuration File

Logging Concepts

Message Categories

Message Priority

Assigning a Priority to a Category

Message Appenders

Message Layout

Putting the Components Together

How to Set Up Logging

Logging Framework Classes

com.bea.logging.ILogger

com.bea.logging.LogContext

com.bea.logging.LogManager

Internationalization and Localization of Log Messages

Saving Contextual Information in a Multi-Threaded Component

 

Developing a Service Adapter

J2EE-Compliant Adapters Not Specific to WebLogic Integration

Service Adapters in the Run-Time Environment

The Flow of Events

Step 1: Development Considerations

Step 2: Configuring the Development Environment

Step 2a: Set Up the File Structure

Modifying the Directory Structure

Step 2b: Assign the Adapter Logical Name

Step 2c: Setting Up the Build Process

The Manifest File

build.xml Components

Step 2d: Create the Message Bundle

Step 3: Implementing the SPI

How to Use this Section

Basic SPI Implementation

ManagedConnectionFactory

Transaction Demarcation

ADK Implementations

AbstractManagedConnectionFactory Properties Required at Deployment

ManagedConnection

ADK Implementation

ManagedConnectionMetaData

ADK Implementation

ConnectionEventListener

ADK Implementation

ConnectionManager

ADK Implementation

ConnectionRequestInfo

ADK Implementation

LocalTransaction

ADK Implementation

Step 4: Implementing the CCI

How to Use this Section

Basic CCI Implementation

Connection

ADK Implementation

Interaction

ADK Implementation

Using XCCI to Implement the CCI

DocumentRecord

IDocument

ADK-Supplied XCCI Classes

XCCI Design Pattern

Using Non-XML J2EE-Compliant Adapters

ConnectionFactory

ADK Implementation

ConnectionMetaData

ADK Implementation

ConnectionSpec

ADK Implementation

InteractionSpec

ADK Implementation

LocalTransaction

Record

ADK Implementation

ResourceAdapterMetaData

ADK Implementation

Step 5: Testing the Adapter

Using the Test Harness

Test Case Extensions Provided by the ADK

sample.spi.NonManagedScenarioTestCase

sample.event.OfflineEventGeneratorTestCase

sample.client.ApplicationViewClient

Step 6: Deploying the Adapter

 

Developing an Event Adapter

Event Adapters in the Run-time Environment

The Flow of Events

Step 1: Development Considerations

Step 2: Configuring the Development Environment

Step 2a: Set up the File Structure

Step 2b: Assign the Adapter Logical Name

Step 2c: Set Up the Build Process

Step 2d: Create the Message Bundle

Step 2e: Configure Logging

Create an Event Generation Logging Category

Step 3: Implementing the Adapter

Step 3a: Create an Event Generator

How the Data Extraction Mechanism is Implemented

How the Event Generator is Implemented

Step 3b: Implement the Data Transformation Method

Step 4: Testing the Adapter

Step 5. Deploying the Adapter

 

Developing a Design-Time GUI

Introduction to Design-Time Form Processing

Form Processing Classes

RequestHandler

ControllerServlet

ActionResult

Word and Its Descendants

AbstractInputTagSupport and Its Descendants

Form Processing Sequence

Prerequisites

Steps in the Sequence

Design-Time Features

Java Server Pages

JSP Templates

The ADK Tag Library

JSP Tag Attributes

JavaScript Library

The Application View

File Structure

The Flow of Events

Step 1: Development Considerations

Step 2: Determining the Screen Flow

Screen 1: Logging In

Screen 2. Managing Application Views

Screen 3: Defining the New Application View

Screen 4: Configuring the Connection

Screen 5: Administering the Application View

Screen 6: Adding an Event

Screen 7: Adding a Service

Screen 8: Deploying an Application View

Controlling User Access

Deploying the Application View

Saving the Application View

Screen 9: Summarizing the Application View

Step 3: Configuring the Development Environment

Step 3a: Create the Message Bundle

Step 3b: Configure the Environment to Update JSPs Without Restarting the WebLogic Server

Step 4: Implementing the Design-Time GUI

Extend AbstractDesignTimeRequestHandler

Methods to Include

Step 4a. Supply the ManagedConnectionFactory Class

Step 4b. Implement initServiceDescriptor()

Step 4c. Implement initEventDescriptor()

Step 5: Write the HTML Forms

Step 5a: Create the confconn.jsp Form

Including the ADK Tag Library

Posting the ControllerServlet

Displaying the Label for the Form Field

Displaying the Text Field Size

Displaying a Submit Button on the Form

Implementing confconn()

Step 5b: Create the addevent.jsp form

Including the ADK Tag Library

Posting the ControllerServlet

Displaying the Label for the Form Field

Displaying the Text Field Size

Displaying a Submit Button on the Form

Adding Additional Fields

Step 5c: Create the addservc.jsp form

Including the ADK Tag Library

Posting the ControllerServlet

Displaying the Label for the Form Field

Displaying the Text Field Size

Displaying a Submit Button on the Form

Adding Additional Fields

Step 5d: Implement Edit Events and Services (optional)

Update wlai.properties

Create edtservc.jsp and addservc.jsp

Implement Methods

Step 5e: Write the WEB-INF/web.xml Web Application Deployment Descriptor

Step 6. Implementing the Look-and-Feel

Step 7. Testing the Sample Adapter Design-Time Interface

Files and Classes

Run the tests

 

Deploying Adapters

Using Enterprise Archive (.ear) Files

Using Shared .jar Files in an .ear File

.ear File Deployment Descriptor

Deploying Adapters

Deploying Adapters by Using the WebLogic Server Administration Console

Deploying Adapters Manually

Adapter Auto-registration

Editing Web Application Deployment Descriptors

Deployment Parameters

Editing the Deployment Descriptors

 

Creating an Adapter Not Specific to WebLogic Integration

Using this Section

Building the Adapter

Updating the Build Process

 

XML Toolkit

Toolkit Packages

IDocument

Schema Object Model (SOM)

How SOM Works

Creating the Schema

The Resulting Schema

Validating an XML Document

How the Document is Validated

Implementing isValid()

isValid() Sample Implementation

 

Migrating Adapters to WebLogic Integration 2.1

Changes to the Deployment Method

How it's Done in WebLogic Integration

Registering the Design-time Web Application

Using a Naming Convention

Using a Text File

Other Migration Issues

 

Adapter Setup Worksheet

Adapter Setup Worksheet

 

The DBMS Adapter

Introduction to the DBMS Adapter

How the DBMS Adapter Works

Before You Begin

Accessing the DBMS Adapter

A Tour of the DBMS Adapter

How the DBMS Adapter Was Developed

Development Reference Documentation

Step 1: Development Considerations

Step 2: Implementing the Server Provider Interface Package

ManagedConnectionFactoryImpl

ManagedConnectionImpl

ConnectionMetaDataImpl

LocalTransactionImpl

Step 3: Implementing the Common Client Interface Package

ConnectionImpl

InteractionImpl

InteractionSpecImpl

Step 4: Implementing the Event Package

EventGenerator

Step 5: Deploying the DBMS Adapter

Before You Begin

Step 5a: Update the ra.xml File

Step 5b: Create the .rar File

Step 5c: Build the .jar and .ear Files

Step 5d: Create and Deploy the .ear File

How the DBMS Adapter Design-Time GUI was Developed

Step 1: Development Considerations

Step 2: Determine Necessary Java Server Pages

Step 3: Create the Message Bundle

Step 4: Implementing the Design-time GUI

Step 5: Writing Java Server Pages

Custom JSP Tags

Save an Object's State

Write the WEB-INF/web.xml Web Application Deployment Descriptor

 

The E-mail Adapter

Introduction to the E-mail Adapter

How the E-mail Adapter Works

Before You Begin

Accessing the E-mail Adapter

A Tour of the E-mail Adapter

How the E-mail Adapter was Developed

Development Reference Documentation

Step 1: Development Considerations

Step 2: Implementing the Server Provider Interface Package

ManagedConnectionFactoryImpl

ManagedConnection

ConnectionMetaDataImpl

Step 3: Implementing the Common Client Interface Package

ConnectionImpl

InteractionImpl

InteractionSpecImpl

Step 4: Implementing the Event Package

EmailEventMetaData

EmailPushEvent

EmailPushHandler

PullEventGenerator

PushEventGenerator

Step 5: Deploying the Adapter

Before You Begin

Step 5a: Update the ra.xml File

Step 5b: Create the .rar File

Step 5c: Build the .jar and .ear Files

Step 5d: Create and Deploy the .ear File

Creating the E-mail Adapter Design-Time GUI

Step 1: Development Considerations

Step 2: Determine E-mail Adapter Screen Flow

Java Server Pages (JSP)

Step 3: Create the Message Bundle

Step 4: Implementing the Design-time GUI

E-mail Implementation

Step 5: Writing Java Server Pages

Step 5a: Developers' Comments

Step 5b: Write the WEB-INF/web.xml Web Application Deployment Descriptor

 

back to top   next page