J2EE™ Connector Architecture and Enterprise Application Integration

Prentice Hall
Rahul Sharma / Beth Stearns / Tony Ng  
Total pages
December 2001
Related Titles

Product detail

Title no longer available


For enterprises seeking to streamline their own processes -- or integrate with partners and suppliers -- the #1 challenge is enterprise application integration (EIA). Sun's new Connector Architecture gives Java developers powerful new tools for simplifying EIA. In this definitive book, the creators of the Connector Architecture explain it in detail -- and demonstrate how to make the most of it. The authors introduce the fundamentals of application integration and the J2EE Connector architecture, including the system contracts it defines for connections, transactions, and security. Next, they present in-depth coverage of J2EE resource adapters from the application developer's perspective. Coverage includes: new connection pooling mechanisms; effective use of the J2EE platform's transactional support; techniques for leveraging J2EE security in application integration projects; and much more. The book shows how to use XML data within the J2EE and Connector framework; and concludes by walking through the construction of a working resource adapter, with extensive code examples. Appendices provide a detailed API reference and glossary.

Table of Contents

(NOTE: Each chapter ends with a Conclusion.)



1. Enterprise Application Integration.

What Is Enterprise Application Integration?

Web-driven Application Integration.

Enterprise Information Systems.

Challenges in EIS Integration.

Enterprise Application Integration Approaches.

Two-Tier Client-Server Approach.

Using Synchronous Adapters

Using Asynchronous Adapters.

Queue-Based Approach.

Publish-Subscribe Approach.

Application Server-Based Integration.

J2EE Connector Architecture and EAI.

2. J2EE Connector Architecture Overview.

What Is the J2EE Platform?

Components and Containers.

J2EE Technologies.

J2EE Connector Architecture Overview.

Connector Architecture Contracts.

System-Level Contracts.

Application Contract.

Packaging and Deployment.

Why Use the Connector Architecture?

Example Scenario.

Application Requirements.

Example Architecture.

3. Managing Connections.

Connection Management Contract.

Connection Management Architecture.

Application Programming Model.

4. Working with Transactions.

Introduction to Transactions.

Characteristics of Transactions.

Commit Protocols.

Key Issues with Transactions.

Developing Transactional Applications.

Using the J2EE Platform.

Using Enterprise Beans.

Using JTA Transactions.

Compensating Transactions.

Transaction Levels.

Sample Application Transaction Scenario.

5. Managing Security.

Security Concepts.



Security Definitions.

Security Model for EIS Connections.

Container-Manages Sign-On.

Component-Manages Sign-On.

Understanding EIS Sign On.

Setting a Resource Principal.

Authenticating a Resource Principal.

Authorizing a Resource Principal.

Establishing a Secure Communication.

Managing Security.

Role of the Application Component Provider.

Role of the Deployer.

Role of the Application Server Vendor.

Other Roles.

Security Example.

Security Environment.

Example Deployment.

6. Asynchronous Messaging.

Synchronous Communication.

Issues to Consider.

Dependency on Specific Middleware Mechanisms.

Dependency Between EIS and Application.

Asynchronous Communication.

Connector Architecture 2.0 Message Handling.

Asynchronous Inbound Communication.

Asynchronous Outbound Communication.

Synchronous Inbound Communication.

JMS-based Communication.

Communication Trade-offs.

Enterprise Messaging Technologies.

Java Message Service.

JMS Overview.

JMS Interfaces.

JMS and EAI.

J2EE Platform and EAI.

Messaga-driven Bean.


7. Common Client Interface.

Overview of the CCI.

CCI Programming Example.

Connection Interfaces.

ConnectionFactory Interface.

ConnectionSpec Interface.

Connection Interface.

LocalTransaction Interface.

Interaction Interfaces.

Interaction Interface.

InteractionSpec Interface.

Data Representation Interfaces.

Metadata Interfaces.

Exception Interfaces.

Code Examples.

Obtaining a Connection.

Using an InteractionSpec Object.

Using a Generic Record.

Using a ResultSet.

Using a Custom Record.

8. Tools and Frameworks.

Types of Tools.

Connector Architecture Tools Support.

EIS Access Objects.

Command Bean.


Data Access Object.

Guidelines for Access Objects.

EJB 2.0 Container-Managed Persistence.

9. XML and the Connector Architecture.

Enterprise Application Integration and XML.

Overview of XML Concepts.

Defining Document Types and Formats.

Java Technologies Supporting XML.

Java API for XML Processing (JAXP).

Java Architecture for XML Binding (JAXB)

Simple API for XML Messaging (JAXM).

Java API for XML-based RPC (JAX-RPC).

Java API for XML Registries (JAXR).

XML and Connector Architecture.

XML and Connector Scenario.

Example Application Processing.

XML Support in Connector Architecture.

10. Building a Resource Adapter.

Implementing a Resource Adapter.

Client API.

Transaction Support Level.

Authentication Mechanism.

Reauthentication Support.

System Contract Interfaces.

Implementing Connection Management.

Connection Factory.

Managed Connection Factory.

Connection Manager.


Connection Handle.

Managing Transactions.

Using Local Transactions.

Handling XAResource Transactions.

Implementing Security Management.

Container Managed Sign-on.

Application Managed Sign-on.

Using the ConnectionRequestInfo Interface.

Handling Connection Events.

Distributing a Resource Adapter.

Packaging a Resource Adapter.

Resource Adapter Deployment Descriptor.

Using an Adapter in the Runtime Environment.

11. Resource Adapter Packaging and Deployment.

Deployment Approaches.

Standalone Deployment.

Bundled Deployment.

Packaging a Resource Adapter.

Deployment and Configuration.

Connection Factory Creation.

Using Packaging and Deployment Tools.

12. Connection Management Contract.

Connection Management Contract.

Contract Overview.


Creating New Connections.

Matching Existing Connections.

Handling Connection Events.

Non-Mangaed Environment.

Connection Management Classes and Interfaces.

ConnectionFactory and Connection Interfaces.

Connection Management Contract.

Support for Error Handling.

13. Transaction Management Contract.

Transaction Management Contract.

Local Transaction Management.

example Local Transaction.

Local Transaction Management Contract Interfaces.

XAResource Transaction Management.

XAResource Interface.

Java Transaction API (JTA).

Two-Phase Commit Protocol.

Requirements for Transaction Management Contract.

Connection Sharing.

Connection Sharing and Local Transactions.

Transaction Scenarios.

Transaction Setup.

Transaction Cleanup.

14. Security Management Contract.

Interfaces and Classes.

Subject Class.

Principle Interface.


GenericCredential Interface.

ManagedConnectionFactory Interface.

Security Management Contract.

Resource Adapter to Application Server Contract.

Application Server to Resource Adapter Contract.

15. Future Directions.

Connector Architecture 2.0.

Asynchronous Resource Adapter Support.

Java Message Service Provider Pluggability.

XML Support in Common Client Interface.

Common Client Interface Metadata Support.

J2EE and EAI.

16. The SAP Connector.

Architecture of SAP Systems.

SAP's Remote Function Call.

The Java Connector (JCO).

Architecture of the SAP Connector.

Connection Management of the SAP Connector.

Transaction Management of the SAP Connector.

Security Management of the SAP Connector.

The Common Client Interface of the SAP Connector.


Package and Class Declaration.

Member Variables.

Getting the Bank List.

Creating a New Bank.

17. Developing Applications with JCA-based Tools.

Enterprise Access Builder (EAB) 101.

JCA Application Development Process.

Overview of the Application.

Using the EAB Session Bean Tool.

Using the Session Bean Editor.

Testing the Application in the WebSphere Test Environment.

Moving Your Application to the WebSphere Application Server.

Deploying the RAR File.

Specifying the Connection Pooling Properties.

Assembling and Deploying the Application onto the WebSphere Application Server.

Using the Deployed Application.

Future Directions.


18. Embracing the J2EE Connector Architecture: The BEA WebLogic Experience.

WebLogic Server's Implementation of the J2EE Connector Architecture Specification.

WebLogic Server Supplementary Deployment Descriptor.

Extended Connection Pool Services.

Example weblogic-ra.xml Deployment Descriptor.

Deployment Descriptor Editor.

Monitoring a Resource Adapter in the WebLogic Server Environment.

WebLogic Integration 2.0.

Application Views.

Adapter Development Kit (ADK).

BEA Partners Adopting the J2EE Connector Architecture.


Appendix A. API Reference.


Index. 0201775808T12042001

Back Cover

The Java™ 2 Enterprise Edition (J2EE) platform connector architecture is the key component in Java's support for enterprise application integration (EAI) and for linking enterprise information systems (EISs) with Web services. Because many services are now provided through the Web, it is essential that business enterprises have an efficient EAI solution. J2EE™ Connector Architecture and Enterprise Application Integration is the definitive guide to showing enterprise organizations how to incorporate existing enterprise infrastructure and applications, taking them into the Web-enabled economy of the future.

Written for application component developers who are building Connector architecture applications, J2EE™ Connector Architecture and Enterprise Application Integration explains how to connect applications not only to one another but also to a multitude of EISs and legacy systems. This book is also of interest to independent software developers (ISVs) and others who develop resource adapters for specific EISs. Readers will learn how to link underlying infrastructure products with J2EE application server and platform technologies.



Rahul Sharma is the lead architect of the J2EE Connector architecture and a Senior Staff Engineer at the Java Software division of Sun Microsystems, Inc. Presently, he is the lead architect of the JAX-RPC (Java APIs for XML based RPC) 1.0. Rahul has been with Sun for the last five years. Rahul holds a computer engineering degree from the Delhi University, India, and an MBA from the Haas School of Business, UC Berkeley.

Beth Stearns is the principal partner of ComputerEase Publishing, a computer consulting firm she founded in 1982. Among her publications are Java Native Interface in The Java Tutorial Continued (Addison-Wesley), “The EJB Programming Guide” for Inprise Corporation, and “ Understanding EDT, ” a guide to Digital Equipment Corporation's text editor.

Tony Ng is a Staff Engineer with Sun Microsystems. He is currently the project lead of the J2EE SDK and Reference Implementation. He has designed and implemented a number of Java technologies, including the J2EE Connector Architecture, the Java Transaction Service, and the J2EE Blueprints. Tony has a B.S. degree in Computer Science from the University of Illinois, Urbana-Champaign, and a S.M. degree in Electrical Engineering and Computer Science from Massachusetts Institute of Technology.