Preface

In their book Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions [EIP], Gregor Hohpe and Bobby Woolf elaborate on the subject of Enterprise Application Integration using messaging. They present, discuss, and illustrate over sixty EAI design patterns. These patterns, they believe, are key patterns most designers of EAI solutions will use when building enterprise integration solutions. Most examples in [EIP] use raw C# and raw Java to illustrate details of EAI patterns under discussion. Most of these patterns can be implemented succinctly, elegantly, and comprehensively using tools and technologies provided in the Sun Java Composite Application Platform Suite [Java CAPS].

This book is about implementing selected enterprise integration patterns, discussed in [EIP], using Java CAPS as the means to building practical enterprise integration solutions. It bridges the gap between the somewhat abstract pattern language and the practical implementation details. It is designed for integration architects, solution architects, and developers who wish to quickly implement enterprise solutions with Java CAPS. It discusses how enterprise integration patterns can be implemented quickly and efficiently by leveraging the Java CAPS tools and the authors’ field experience.

While this book discusses Java CAPS implementation of [EIP] patterns, it does not discuss the patterns in depth. It is assumed that you are already familiar with the subject and need to apply the theoretical knowledge using Java CAPS.

This book is also about basics of the essential Java CAPS Suite components, based on the premise that you cannot apply patterns if you cannot effectively use the tools with which to do it. Since the complete Java CAPS offering has so many components, including ones that are not essential to integration, this book elaborates only on the basic integration tools: eGate, eInsight, eWays, and Java Message Service (JMS).

This book also provides information you may need to effectively use Java CAPS. A considerable amount of Java CAPS-related material, provided in the text, is not published anywhere else.

The accompanying CD-ROM provides over 60 detailed examples that illustrate concepts and patterns under discussion. Some examples are high level, illustrating specific points. Other examples follow a step-by-step approach.

Java CAPS projects discussed and developed as examples are available for import and perusal.

How This Book Is Organized

This book is divided into three sections. Section I, “Preliminaries,” contains chapters that discuss integration and background Java CAPS topics, including enterprise integration styles, Java CAPS architecture, and project structure and deployment.

Section II, “Patterns Review and Application,” covers most [EIP] patterns with discussion of Java CAPS approaches to implementing them. This section includes chapters dealing with message exchange patterns, message correlation, messaging infrastructure, message routing, message construction, message transformation, messaging endpoints, and system management patterns and concepts. While discussing Java CAPS implementation of specific patterns, relevant Java CAPS concepts and methods are also discussed. When discussing implementations of the Message Sequence pattern, for example, Java CAPS concepts of JMS serial mode concurrency, Sun SeeBeyond JMS Message Server FIFO modes, and serializing eInsight Business Processes via JMS and XA are also discussed.

Section III, “Specialized Java CAPS Topics,” discusses non-pattern matters of importance like solution partitioning, subprocess and Web Services implementation, management, reusability, scalability and resilience options, and others that are not covered elsewhere. This section also covers security features of Java CAPS.

The accompanying CD-ROM contains over 60 detailed examples implementing most of the patterns and concepts under discussion as well as two complete example solutions using many of the patterns discussed and illustrated in this book. The CD-ROM also contains a detailed practical walkthrough of generation and use of cryptographic objects such as X.509 Certificates, PKCS#12 and JKS Keystores, and related matters.

About the Examples

Conventions

Java CAPS Enterprise Designer (eDesigner) is a NetBeans-based Integrated Development Environment (IDE), which developers use to design and build Java CAPS integration solutions. The vast majority of tasks can be accomplished in eDesigner by means of manipulating components represented by graphical objects, connecting graphical objects with lines, filling information in dialog boxes and property sheets, and choosing components in drop-down menus. The intention was to make development of integration solutions easy for business analysts and similar persons whose coding skills might not be up to the task in nongraphical environments. Since development of Java CAPS solutions results in production of J2EE Enterprise Applications, this graphical orientation might come as a bit of a surprise to hardcore J2EE developers used to writing raw Java and the fine-grained control they exercise through deployment descriptors and other J2EE artifacts. Be that as it may, you will find most Java Collaboration examples shown using Java source code rather than its graphical equivalent. This is principally to make the samples concise, clearly showing essential parts of each solution, and to minimize wasting space on graphics that add no particular value to the discussion. Every one of the Java Collaborations could have been shown in “Standard mode,” but that would have required numerous pictures, pretty much one for each Java statement, to illustrate what just a few lines of Java code can show in just a few lines. Figure P-1 shows an example of a Java Collaboration in Standard mode.

Java Collaboration in Standard mode

Figure P-1. Java Collaboration in Standard mode

Evident are several lines of pseudocode in the Business Rules pane and just one mapping in the Business Rules Designer pane.

In contrast, the same Java Collaboration in Source Code mode is much more illuminating, as seen in Figure P-2, as it shows all there is to know about 30 or so lines of code all at once.

Java Collaboration in Source Code mode

Figure P-2. Java Collaboration in Source Code mode

Since switching between Standard mode and Source Code mode is a button-click away, we chose to use Source Code mode for Java Collaboration examples.

eInsight Business Processes are much easier to understand when presented in the graphical view, appearing similar to what is shown in Figure P-3. Object icons, taken from the Business Process Modeling Notation, are quite pleasant to look at, in this author’s opinion.

eInsight Business Processes in the graphical view

Figure P-3. eInsight Business Processes in the graphical view

In contrast, working directly with BPEL4WS XML source, an example of which is shown in Figure P-4, which is possible, is in this author’s opinion bordering on cruel and unusual punishment, just as working directly with any other XML-based procedural language would be.

BPEL4WS XML source

Figure P-4. BPEL4WS XML source

So, Java Collaborations are mostly shown in the Source Code mode, and eInsight Business Processes are mostly shown with the Business Rules Designer.

How you work with the tool is still up to you.

List of Illustrations and Examples

To include both discussion and all relevant examples in one book would have made it over 1,000 pages in length—too large for printing. As a consequence, this book discusses Java CAPS facilities, focusing on their application to implementation of enterprise integration patterns with high-level illustrations. References to detailed examples are provided in PDF format on the accompanying CD-ROM. The PDF on the CD-ROM provides both detailed illustrations for most of the patterns as well as two completely worked-through Java CAPS–based case study solutions that implement a number of the patterns discussed in this book.

The CD-ROM also contains a chapter dealing with cryptographic objects used to configure security-related aspects of the suite.

Illustrations and examples included on the CD-ROM are listed in Table P-1, with section headers in the order of appearance. Of the over 60 examples, most are developed in a step-by-step manner, deployed, and exercised. In most cases, results of execution are shown and discussed.

Table P-1. Illustrations and Examples in Part II

Chapter/Section

Example Topic

Hello Java CAPS World

Introductory step-by-step example. Basic file transfer projects with separate implementations using eGate and eInsight.

Event Message Using Scheduler

Event Message pattern implementation.

Basic scheduled solution using Event Message triggered by a Scheduler eWay.

External Scheduler Example

Event Message pattern implementation.

Scheduled solution using external scheduler and an external TCP Sender client injecting an Event Message through a TCP Server eWay.

JMS Request/Reply Invoker for eInsight

Request/Reply pattern implementation.

New Web Service Java Collaboration for invoking JMS Request/Reply functionality from an eInsight Business Process.

JMS Request/Response Auction Pattern

Request/Reply pattern implementation.

Java Collaboration and JMS Request/Reply–based implementation of an Auction pattern where the fastest responder wins.

HTTP Request/Response

Request/Reply pattern implementation.

A series of HTTP requestor and HTTP responder implementations using both HTML and XML payloads, prefaced by a recap of HTTP principles and mechanics.

SOAP Request/Response

Request/Reply pattern implementation.

Specialization of a HTTP request/response implementation using explicitly constructed and parsed SOAP XML messages as requests and responses.

Web Service Request/Reply

Request/Reply pattern implementation.

Web Service request/response implementation as an example of a Request/Response pattern using both eInsight Business Processes and Java Collaborations.

JMS Serial Mode Concurrency

Message Sequence pattern.

Using Sun SeeBeyond JMS Message Server facilities for implementation of message sequence preserving solutions.

Sun SeeBeyond JMS FIFO Modes

Using Sun SeeBeyond JMS Message Server facilities for implementation of message sequence preserving solutions. Series of examples demonstrates the impact of different Sun SeeBeyond JMS Message Server FIFO modes on message sequence.

Serializing Business Processes with XA

Message Sequence pattern.

Examples illustrating the impact of imposing XA transactionality on eInsight Business Processes and how it affects message sequence preservation (new in v. 5.1)

Message Expiration

Java Collaboration and JMS-based example illustrating Message Expiration.

Batch Local File Streaming

Data streaming examples using Batch Local File eWay with discussion of buffering and its impact on message throughput.

eTL Streaming

Very basic eTL example streaming data from a flat file to a database table and a functionally equivalent Java Collaboration example.

Temporary JMS Destinations

Anti-example illustrating the use of an explicitly created JMS temporary destination.

Static Selector

Example illustrating the use of static JMS selectors.

Dynamic Selector

Example illustrating the use of dynamic JMS selectors, constructed at runtime and used in a Java Collaboration to explicitly choose messages to receive.

Resilient JMS with JMS Grid

Example of a simple JMS Grid-based automatic JMS Client failover.

JMS Message Body Formats

Example collaboration that inspects JMS header properties to determine JMS message body format and branch.

Dead Letter Channel in 5.1.2

Example exercising JMS Redelivery Handling functionality with undeliverable message being delivered to a Dead Letter Queue.

eInsight XA Transactionality

Example inducing success and failure outcomes that demonstrate XA transactionality of an eInsight Business Process with side effects in non-XA-capable resources.

eInsight Persistence

Illustration of eInsight persistence, eInsight monitoring, and eInsight restart-recovery of in-flight process instances.

Resequencer: Basic Version

Simple resequencer with memory-based message buffer.

Resequencer: Persisted Version

More sophisticated resequencer with RDBMS-based message buffer and message sequence persistence.

Routing Slip

Routing slip-based message routing solution using JSM and Java Collaborations.

JMS User Properties Envelope Wrappers

Series of examples demonstrating Envelope Wrapper pattern implemented using JMS message header properties in Java Collaborations and eInsight Business Processes.

Content Enricher

Content Enricher implementation using eInsight and Oracle eWay to receive a Purchase Order, enrich it with pricing information for an Oracle database, and produce an Invoice.

Polling File System

Series of examples polling local file system using Scheduler eWay–driven and Batch Inbound–driven Batch Local File eWay to implement polling solutions.

Polling JMS Destination

Try-wait-retry FTP delivery solution implementing JMS Destination polling for retry scheduling.

Durable Subscriber

Example illustrating the concept of a JMS topic durable subscriber and behavioral differences between nondurable and durable subscribers.

Idempotent Receiver

Example illustrating message duplication detection–based Idempotent receiver solution.

Multi-Input Service Activator

Example using the OpenTravel Alliances XML Schema documents to implement a Service Activator solution that allows the business service to be activated through a file submission, JMS message submission, and Web Services invocation.

Monitoring eInsight-based Solutions

Example illustrating eInsight persistence, persistence for reporting, and runtime monitoring of eInsight Business Process instances.

Simple Alert Processor for a JMS Channel

Example implementing a simple solution that receives and processes Alert Agent alerts delivered through the JMS Alert Channel.

Catching “Uncatchable” Exceptions

Example using Alert Agent infrastructure to catch and process exceptions that occur outside the Java Collaborations and Business Processes and therefore cannot be caught and processed in JCDs or BPs. Catching and processing a database connectivity exception is the subject of this example.

Programmatic Management

Example Java Collaboration that uses the JMX instrumentation to programmatically start and stop a specified Java CAPS component, such as another Java Collaboration or a Business Process service.

JMS Latency

Java Collaboration and eInsight Business Process examples illustrating calculation of JMS message delivery latency.

eInsight Correlation Processor: First Cut

Example of an incorrect, naïve implementation of eInsight correlation.

eInsight Correlation Processor: Second Cut

Example of correct implementation of a simple eInsight correlation with a simple correlation key.

Derived Correlation Identifiers

Example of a more complex eInsight correlation with a structured, message-derived correlation key based on a subprocess-based correlation key derivation solution.

Derived Correlation Identifiers: Alternative

Alternative example of a more complex eInsight correlation with a structured, message-derived correlation key based on Java Collaboration correlation key derivation preprocessor.

Message Relationship Patterns

Series of examples of using eInsight correlation facilities to implement Message Relationship patterns: Header-Items-Trailer Correlation, Any Order Two Items Correlation, Any Order Two Items Correlation with Timeout, Items-Trailer Correlation, Header Counted Items Correlation, Counted and Timed Items Correlation, Timed Items Correlation, Scatter-Gather Correlation.

Items-Trailer Correlation

Reimplementation of the Items-Trailer Correlation using a Java Collaboration, JMS, and dynamic JMS selectors—no eInsight.

Using New Web Service Collaborations

Example of using New Web Service Java Collaborations to implement reusable modules for use as activities in eInsight Business Processes.

Using eInsight Subprocesses for Reusability

Series of examples of using eInsight subprocesses as reusable components for use as activities in eInsight Business Processes: Request/Response, OneWay Operation, and Notification Subprocess implementations.

Using eInsight Web Services for Reusability

Series of examples of using Web Services as reusable components for use as activities in eInsight Business Processes: Request/Response, OneWay Operation, and Notification Web Service implementations.

JMS-Triggered Java Collaborations

Example of exception and JMS redelivery handling in a JMS message–triggered Java Collaboration.

Other Java Collaborations

Example of exception processing in a non-JMS message–triggered Java Collaboration.

JMS-Triggered Business Processes

Example of exception handling in a JMS message–triggered eInsight Business Process demonstrating behavior differences between XA and non-XA processes.

Fault Handlers

Example of using Fault Handlers in eInsight Business Processes.

Secure Sockets Layer (SSL, TLS)

Series of examples illustrating the use of SSL in Java CAPS solutions, both HTTP eWay- and Web Services-based. Covers server-side and mutual authentication for both server and client endpoints.

Web Service, Stored Procedures, and XA

Complete case study implementing an Employee Database Maintenance process with a multi-database update, Web Services, Oracle Stored Procedures, and an XA Business Process. This example implements and exercises a large number of patterns and suite features.

Example Travel Reservation

Complete Travel Reservation case study using Web Services orchestration and eInsight exception handling and compensation. This example implements and exercises a large number of patterns and suite features.

Handling Repeating Nodes in BPEL

Example of handling repeating nodes from XSD-based OTD in eInsight.

XML Deep Parse vs. Shallow Parse

Example implementing lazy XMLparse.

Using Multi-Operation WSDL

Example of implementing a multi-operation Web Service using WSDL and eInsight.

Cryptographic Objects

Step-by-step discussion of cryptographic objects required to configure PKI-related aspects of Java CAPS, with tools, commands, and scripts necessary to create certificate signing requests, convert between various certificate formats, and create various keystore types.

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset