Microsoft .NET and J2EE Interoperability Toolkit (Pro-Developer)

This brief overview provides basic information about the Java Connector Architecture (JCA). It explains how JCA makes the process of accessing and integrating disparate information systems much easier. One of the goals of the new J2EE connector architecture is to bring Enterprise Application Integration (EAI) into mainstream use. Although full coverage of this technology is beyond the scope of this book, the goal is to inform the reader about the JCA technology and the benefits derived from using connectors to access an Enterprise Information System (EIS).

Components of the JCA

The finalized JCA specification, version 1.5, released on October 31, 2002, provides a convenient mechanism for storing and retrieving enterprise data in J2EE. Examples of EISs include ERP (Enterprise Resource Planning), mainframe transaction processing, and database systems. The connector architecture also defines a Common Client Interface (CCI) for EISs access. The CCI defines a client API for interacting with disparate systems.

The connector architecture allows integration between J2EE servers and EISs. The architecture consists of two parts:

Connection Management Contracts

A connection-level contract provides the agreement that a J2EE container must have with an adapter and refers to establishing, pooling, and destroying connections. In addition, the contract allows interested listeners to respond to events such as error handling.

All JCA resource adapters must provide two implementations with the adapter. First, a ConnectionFactor offers a vehicle for creating connections. Second, the Connection class represents the specified resource adapter’s connection.

Transaction Management Contract

The transaction management contract manages transactions in two different ways. First, it permits distributed transactions to propagate transactions that begin from inside the application server to an EIS. Second, the transaction management contract can control transactions by creating local transactions as well.

Note

Local transactions can only exist on specified EIS resources.

Security Contract

The security contract allows the application server to connect to an EIS by employing security properties. The server authentication process consists of a user ID and a password or certificate. The application server can use two methods to authenticate to an EIS: component-managed sign-on and container-managed sign-on.

The most efficient method of configuring security properties is using component-managed sign-on. This permits the developer to pass security properties every time a connection is acquired from the resource adapter. In the second method, container-managed sign-on, the security credentials configure when the resource adapter is deployed on the application server. Several different options are available for configuring security properties when using the container-managed sign-on procedure:

Exploring the Common Client Interface

It is possible to employ JCA’s Common Client Interface methodology, representing functionality similar to employing JDBC to invoke remote procedures. CCI APIs are divided into four sections:

Connection interfaces refer to APIs used to establish a connection to an EIS. Interaction interfaces are related to command execution on an EIS. The Record/ ResultSet interfaces encapsulate query results to an EIS. Metadata interfaces permit the querying of EIS data types.

It is significant that most recent releases of application servers, including IBM’s WebSphere application server, version 5.0, and BEA’s WebLogic application server, support JCA adapters for enterprise connectivity. Using JCA for access to an Enterprise Information System is similar to using JDBC (Java Database Connectivity) to access a relational database or other type of repository.

Before the emergence of JCAs, individual EAI vendors found it necessary to create a proprietary resource adapter interface for their own EAI product. This means the vendor’s product required the development of a resource adapter for each EAI vendor and EIS combination. To solve that cumbersome requirement, JCA provides a way of standardizing all resource adapter interfaces.

Understanding the Role of a Resource Adapter

What is a resource adapter? A resource adapter is a system-level library used by an application server or a client to connect to a resource manager. The resource adapter may also provide additional services beyond the connection API. The resource adapter plugs into an application server and facilitates connectivity between the EIS, the application server, and the enterprise application itself. The application server extends its system to support the connector architecture. This ensures connectivity to multiple EISs. In addition, the resource adapter plugs into any application server that supports the JCA.

The next question naturally follows: what role does the resource manager play? It provides access to an identified collection of shared resources. The resource manager is an active participant in a transaction.

Note

Most EAI vendors include proprietary adapters designed to function with their own products. Those adapters allow for both asynchronous and synchronous communications with an EIS. However, JCA adapters support only a synchronous communication channel.

Data Mapping

Data mapping is easy to understand. It simply means data retrieved from a resource, such as a relational database or similar repository (this could also include Microsoft’s Active Directory), and acquired in one format or another. The data requires restructuring in a format based on a business object’s need. For example, let’s assume the data retrieved exists in PDF format and needs transformation into XML. In order to achieve document restructuring, XML-based technologies such as XSLT exist precisely for this purpose.

It is always challenging to map data from one system to another because each business object must be mapped on both systems, an extremely time-consuming process. Fortunately, most EAI vendors provide tools to enable a developer to achieve mapping. The Enterprise JavaBeans Container Managed Persistence facility provides such mapping tools.

Understanding the Message Broker

Message brokers support both point-to-point and publish/subscribe messaging. In fact, many EAI products frequently use messaging as the connectivity layer to bind disparate systems together. A developer can implement some of a message broker’s features in an EAI product by employing Java Message Service (JMS), an integral part of J2EE.

Constructing an Integration Workflow Plan

Integration can be defined as two separate processes:

Inbound integration refers to external systems initiating data requests to a system. Outbound integration means that your local system initiates requests to external systems. The following list details integration types available for both inbound and outbound messaging:

Категории