bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Developing Adapters

 Previous Next Contents Index View as PDF  

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 Exclusive to WebLogic Integration

Design-Time GUI

Application Views

Packaging Framework

Before You Begin

Basic Development Concepts

Run Time Versus Design Time

Run-Time Framework

Design-Time Framework

Events and Services

What Are Events?

What Are Services?

How Adapters Use Logging

Logging Toolkit

Logging Framework

Internationalization and Localization

Adapter Logical Name

Where the Adapter Logical Name Is Used

Use of Adapter Logical Name in Adapter Deployment

Adapter Logical Name Used as an Organizing Principle

Adapter Logical Name Used as the Return Value for getAdapterLogicalName()

Shared Connection Factories

Referencing Connection Factories at Startup

Enterprise Archive (EAR) Files

How Adapters Handle Concurrent Requests

Development Tools

Sample Adapter

Why Use the Sample Adapter?

What Is In the Sample Adapter?

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 1a. Specify the Console Codepage (Windows Only)

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 Multithreaded Component

Developing a Service Adapter

J2EE-Compliant Adapters Not Specific to WebLogic Integration

Service Adapters in a Run-Time Environment

Flow of Events

Step 1: Research Your Environment Requirements

Step 2: Configure the Development Environment

Step 2a: Set Up the Directory Structure

Modifying the Directory Structure

Step 2b: Assign the Adapter Logical Name

Step 2c: Set Up the Build Process

Manifest File

build.xml Components

Step 2d: Create the Message Bundle

Step 3: Implement the SPI

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: Implement the CCI

How to Use This Section

Basic CCI Implementation

Connection

ADK Implementation

Interaction

ADK Implementation

Using XCCI to Implement the CCI

Services

DocumentRecord

IDocument

ADK-Supplied XCCI Classes

XCCI Design Pattern

Using NonXML J2EE-Compliant Adapters

ConnectionFactory

ADK Implementation

ConnectionMetaData

ADK Implementation

ConnectionSpec

ADK Implementation

InteractionSpec

ADK Implementation

LocalTransaction

Record

ADK Implementation

ResourceAdapterMetaData

ADK Implementation

Step 5: Test the Adapter

Using the Test Harness

Test Case Extensions Provided by the ADK

sample.spi.NonManagedScenarioTestCase

sample.event.OfflineEventGeneratorTestCase

sample.client.ApplicationViewClient

Step 6: Deploy the Adapter

Developing an Event Adapter

Introduction to Event Adapters

Event Adapters in a Run-Time Environment

Flow of Events

Step 1: Define the Adapter

Step 2: Configure the Development Environment

Step 2a: Set Up the File Structure

Step 2b: Assign a Logical Name to the Adapter

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: Implement 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: Test the Adapter

Step 5. Deploy 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

ADK Library of JSP Tags

JSP Tag Attributes

The Application View

File Structure

Flow of Events

Step 1: Defining the Design-Time GUI Requirements

Step 2: Defining the Page Flow

Page 1: Logging In

Page 2. Managing Application Views

Page 3: Defining the New Application View

Page 4: Configuring the Connection

Page 5: Administering the Application View

Page 6: Adding an Event

Page 7: Adding a Service

Page 8: Deploying an Application View

Controlling User Access

Deploying an Application View

Saving an Application View

Page 9: Summarizing an Application View

Step 3: Configuring the Development Environment

Step 3a: Create the Message Bundle

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

Step 4: Implement 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 Editing Capability for Events and Services (optional)

Update the Adapter Properties File

Create edtservc.jsp and addservc.jsp

Implement Methods

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

Step 6. Implement the Look and Feel

Step 7. Test 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 Using the WebLogic Server Administration Console

Adapter Auto-registration

Using a Naming Convention

Using a Text File

Editing Web Application Deployment Descriptors

Deployment Parameters

Editing the Deployment Descriptors

Deploying Adapters in a WebLogic Integration Cluster

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

Resulting Schema

Validating an XML Document

How the Document Is Validated

Implementing isValid()

isValid() Sample Implementation

Migrating Adapters to WebLogic Integration 7.0

Rebuilding Adapters Against the WebLogic Integration 7.0 ADK

Application Integration CLASSPATH and Adapter Packaging Changes

Allowing Adapters to Support the Shared Connection Factory User Interface

Changes in Security Constraints and Login Configuration

Changes to DBMS Sample Adapter for Services Not Requiring Request Data

Using WebLogic Integration 2.1 Adapters with WebLogic Integration 7.0

Adapter Setup Worksheet

Adapter Setup Worksheet

Learning to Develop Adapters Using the DBMS Sample Adapter

Introduction to the DBMS Sample Adapter

How the DBMS Sample Adapter Works

Before You Begin

Accessing the DBMS Sample Adapter

Tour of the DBMS Sample Adapter

How the DBMS Sample Adapter Was Developed

Step 1: Learn About the DBMS Sample Adapter

Step 2: Define Your Environment

Step 3: Implement the Server Provider Interface Package

ManagedConnectionFactoryImpl

ManagedConnectionImpl

ConnectionMetaDataImpl

LocalTransactionImpl

Step 4: Implement the Common Client Interface Package

ConnectionImpl

InteractionImpl

InteractionSpecImpl

Step 5: Implement the Event Package

EventGenerator

Step 6: Deploy the DBMS Sample Adapter

Step 6a: Set Up Your Environment

Step 6b: Update the ra.xml File

Step 6c: Create the RAR File

Step 6d: Build the JAR and EAR Files

Step 6e: Create and Deploy the EAR File

How the DBMS Sample Adapter Design-Time GUI Was Developed

Step 1: Identify Requirements

Step 2: Identify Required Java Server Pages

Step 3: Create the Message Bundle

Step 4: Implement the Design-Time GUI

Step 5: Write Java Server Pages

Use Custom JSP Tags

Save an Object's State

Write the WEB-INF/web.xml Deployment Descriptor

 

Back to Top Previous Next