Java™ CAPS Basics: Implementing Common EAI Patterns

Book description

Use Java CAPS to Streamline IT Services and Leverage Legacy Applications

Design patterns are a useful tool for streamlining enterprise integration and Web development projects: the mission-critical projects that directly impact your competitiveness. Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf (Addison-Wesley, 2004) described many of the most useful patterns for enterprise developers. Until recently, however, implementing the patterns in that classic reference required the extensive use of raw Java code. Now there’s a better alternative: Using Sun’s Java Composite Application Suite (Java CAPS), architects and developers can implement enterprise integration patterns succinctly, elegantly, and completely.

In Java™ CAPS Basics, Sun’s own Java CAPS experts show how to quickly put these new tools and technologies to work in your real-world enterprise application integration projects. After reviewing the challenges of enterprise integration, they introduce Java CAPS and show how it can simplify the development of today’s state-of-the-art “composite” applications. Next, they bridge the gap between abstract pattern languages and practical implementation details. You will learn essential Java CAPS concepts and methods in the context of the patterns you’ll actually use for real-world message and system management.

Coverage includes

  • Comparing approaches to enterprise application integration and finding ways to integrate non-invasively, with fewer changes and lower costs

  • Mastering the core integration tools provided by Java CAPS: eGate, eInsight, eWays and JMS

  • Using enterprise integration patterns to improve application reusability, scalability, resilience, security, and manageability

  • Implementing patterns for message exchange, correlation, infrastructure, routing, construction, transformation, and endpoints

  • Generating and using cryptographic objects such as X.509 Certificates, PKCS#12, and JKS Keystores

  • Using advanced techniques such as solution partitioning and subprocess implementation, many of which are covered nowhere else

  • Constructing two complete example solutions that bring together many of the patterns discussed and illustrated in this book


  • The companion CD contains detailed illustrations for most of the relevant patterns and two complete Java CAPS-based case studies (with solutions) that implement a number of the patterns discussed in the book. In addition, Part II contains a chapter on cryptographic objects used to configure security-related aspects of the suite. It also provides more than sixty detailed examples designed to illustrate the concepts and patterns presented in this book. Built with JCAPS eDesigner, these graphical, component-based examples can easily be used by business analysts and others with or without strong coding skills.

    Table of contents

    1. Copyright
    2. Preface
      1. How This Book Is Organized
      2. About the Examples
        1. Conventions
      3. List of Illustrations and Examples
    3. Acknowledgments
    4. About the Authors
    5. I. Preliminaries
      1. One. Enterprise Integration Styles
        1. 1.1. Introduction
        2. 1.2. File Transfer
        3. 1.3. Database Sharing
        4. 1.4. Remote Procedure Invocation
        5. 1.5. Messaging
        6. 1.6. Service Orchestration
        7. 1.7. Centralized versus Distributed
        8. 1.8. Chapter Summary
      2. Two. Java CAPS Architecture
        1. 2.1. Introduction
        2. 2.2. Historical Note
        3. 2.3. Context
        4. 2.4. Java CAPS Architecture
        5. 2.5. Solution Development Stages
        6. 2.6. Chapter Summary
      3. Three. Project Structure and Deployment
        1. 3.1. Introduction
        2. 3.2. From Logical Solution to Physical Deployment
        3. 3.3. Project Structure Considerations
          1. 3.3.1. Connectivity Map and Deployment Profile
          2. 3.3.2. Variables and Constants
        4. 3.4. Backup of Development Artifacts
        5. 3.5. Release Management
          1. 3.5.1. Using Java CAPS Source Control System
            1. 3.5.1.1. Checked-In State
            2. 3.5.1.2. Checked-Out State
            3. 3.5.1.3. Retrieved State
            4. 3.5.1.4. Branching
            5. 3.5.1.5. Project Tagging
            6. 3.5.1.6. Deployment Profile Snapshot Version Control
            7. 3.5.1.7. Creating Snapshots
            8. 3.5.1.8. Retrieving Snapshots
          2. 3.5.2. Using a Third-Party Source Control System
            1. 3.5.2.1. Migration and Rollback Process
            2. 3.5.2.2. General Release Process
            3. 3.5.2.3. The Rollback Release Process
        6. 3.6. Deployment Architectures
          1. 3.6.1. Small Deployment
          2. 3.6.2. Medium to Large Deployment
        7. 3.7. Command-Line Build and Deployment
          1. 3.7.1. Scripting the Build Process
          2. 3.7.2. Project Build Script
          3. 3.7.3. Project Deployment Script
        8. 3.8. Chapter Summary
    6. II. Patterns Review and Application
      1. Four. Message Exchange Patterns
        1. 4.1. Introduction
        2. 4.2. Document Message
        3. 4.3. Command Message
        4. 4.4. Event Message
        5. 4.5. Request/Reply
          1. 4.5.1. JMS Request/Reply
          2. 4.5.2. HTTP Request/Reply
          3. 4.5.3. eInsight Subprocess
          4. 4.5.4. SOAP Request/Reply
          5. 4.5.5. Web Services Implementation
          6. 4.5.6. Request/Reply Summary
        6. 4.6. Return Address
        7. 4.7. Correlation
        8. 4.8. Message Sequence
          1. 4.8.1. JMS Serial Mode Concurrency
          2. 4.8.2. Sun SeeBeyond JMS Message Server FIFO Modes
          3. 4.8.3. Serializing Business Processes via JMS and XA
        9. 4.9. Message Expiration
        10. 4.10. Format Indicator
        11. 4.11. Data Streaming
          1. 4.11.1. Batch eWay Streaming
          2. 4.11.2. eTL Streaming
        12. 4.12. Message Security
        13. 4.13. Chapter Summary
      2. Five. Messaging Infrastructure
        1. 5.1. Introduction
        2. 5.2. Java Message Service (JMS)
        3. 5.3. JMS Implementation Interoperability
        4. 5.4. Using JMS to Integrate Non-Java Environments
        5. 5.5. Queues versus Topics
        6. 5.6. Sun SeeBeyond IQ Manager
          1. 5.6.1. JMS Destination Creation and Destruction
          2. 5.6.2. Temporary JMS Destinations
          3. 5.6.3. Security
          4. 5.6.4. Transactionality
          5. 5.6.5. Concurrency
          6. 5.6.6. Persistence
          7. 5.6.7. Selectors
            1. 5.6.7.1. Static Selector
            2. 5.6.7.2. Dynamic Selector
          8. 5.6.8. FIFO Modes
          9. 5.6.9. Throttling
          10. 5.6.10. Redelivery Handling
          11. 5.6.11. Message Journaling
        7. 5.7. Resilient JMS with JMS Grid
        8. 5.8. Competing Consumers
          1. 5.8.1. eGate and Java Collaborations
          2. 5.8.2. eInsight Business Processes
        9. 5.9. Point-to-Point Channel
        10. 5.10. Publish-Subscribe Channel
        11. 5.11. Datatype Channel
          1. 5.11.1. JMS Message Body Formats
          2. 5.11.2. Endpoint-Dependent Datatypes
          3. 5.11.3. Multiple Datatypes in Java Collaborations
          4. 5.11.4. Multiple Datatypes in Business Processes
        12. 5.12. Invalid Message Channel
        13. 5.13. Dead Letter Channel
          1. 5.13.1. Java CAPS Releases Prior to 5.1.2
          2. 5.13.2. Java CAPS Release 5.1.2
          3. 5.13.3. Documentation Note
        14. 5.14. Guaranteed Delivery
          1. 5.14.1. Is Guaranteed Delivery Always Required?
          2. 5.14.2. Java CAPS Facilities for Guaranteed Delivery
          3. 5.14.3. Persistence Notes
          4. 5.14.4. JMS-Based Guaranteed Delivery
            1. 5.14.4.1. Message Expiry
            2. 5.14.4.2. Transacted Sessions
            3. 5.14.4.3. Persistent Delivery Mode
          5. 5.14.5. eInsight Guaranteed Delivery
            1. 5.14.5.1. eInsight XA Transactionality
            2. 5.14.5.2. eInsight Persistence
          6. 5.14.6. Solution-Specific Guaranteed Delivery
          7. 5.14.7. Summary
        15. 5.15. Channel Adapter
        16. 5.16. Messaging Bridge
          1. 5.16.1. Bridging Independent Java CAPS Solutions
          2. 5.16.2. Bridging Other JMS Messaging Implementations
          3. 5.16.3. Other Bridging Solutions
        17. 5.17. Message Bus
        18. 5.18. Chapter Summary
      3. Six. Message Routing
        1. 6.1. Introduction
        2. 6.2. Overview
        3. 6.3. Fixed Router
        4. 6.4. Content-Based Router
        5. 6.5. Message Filter
        6. 6.6. Recipient List
        7. 6.7. Splitter
        8. 6.8. Aggregator
        9. 6.9. Resequencer
        10. 6.10. Composed Message Processor
        11. 6.11. Scatter-Gather
        12. 6.12. Routing Slip
        13. 6.13. Process Manager
        14. 6.14. Message Broker
        15. 6.15. Chapter Summary
      4. Seven. Message Construction
        1. 7.1. Introduction
        2. 7.2. Message
        3. 7.3. Object Type Definitions
          1. 7.3.1. Generating Oracle Table OTD
          2. 7.3.2. Other OTD Wizards
        4. 7.4. Envelope Wrapper
          1. 7.4.1. Delimited Envelope Wrapper
          2. 7.4.2. Enveloping XML within XML
          3. 7.4.3. JMS User Properties Envelope Wrappers
        5. 7.5. Chapter Summary
      5. Eight. Message Transformation
        1. 8.1. Introduction
        2. 8.2. Envelope Wrapper
        3. 8.3. Content Enricher
        4. 8.4. Content Filter
        5. 8.5. Claim Check
        6. 8.6. Normalizer
        7. 8.7. Canonical Data Model
        8. 8.8. Chapter Summary
      6. Nine. Messaging Endpoints
        1. 9.1. Introduction
        2. 9.2. Messaging Gateway
        3. 9.3. Transactional Client
        4. 9.4. Polling Consumer
          1. 9.4.1. Polling File System
          2. 9.4.2. Other Batch Pollers
          3. 9.4.3. Polling JMS Destination
        5. 9.5. Event-Driven Consumer
        6. 9.6. Competing Consumers
        7. 9.7. Message Dispatcher
        8. 9.8. Selective Consumer
        9. 9.9. Durable Subscriber
        10. 9.10. Idempotent Receiver
        11. 9.11. Service Activator
        12. 9.12. Chapter Summary
      7. Ten. System Management
        1. 10.1. Introduction
        2. 10.2. Java CAPS Monitoring and Management
          1. 10.2.1. Overview
          2. 10.2.2. Monitoring eGate-Based Solutions
          3. 10.2.3. Monitoring eInsight-Based Solutions
          4. 10.2.4. JMS Administration Tools
            1. 10.2.4.1. Sun SeeBeyond JMS IQ Manager
          5. 10.2.5. Event Notification with Alert Agent
            1. 10.2.5.1. Configuring Alert Agent
            2. 10.2.5.2. Summary
          6. 10.2.6. SNMP Agent
            1. 10.2.6.1. SNMP Agent Configuration
            2. 10.2.6.2. SNMP Agent Traps
            3. 10.2.6.3. SNMP Agent Listener
            4. 10.2.6.4. SNMP Agent Security Configuration
            5. 10.2.6.5. SNMP Agent Configuration Files
            6. 10.2.6.6. SNMP Agent Debug Logging
          7. 10.2.7. Enterprise Manager Command-Line Tool
          8. 10.2.8. Enterprise Manager Web Service API
            1. 10.2.8.1. Service Manager Service
            2. 10.2.8.2. Login Service
            3. 10.2.8.3. Runtime Service
            4. 10.2.8.4. Alert Service
          9. 10.2.9. Java Management Extensions (JMX)
            1. 10.2.9.1. Java CAPS JMX Console Web Application
            2. 10.2.9.2. J2SDK 1.5 JConsole
            3. 10.2.9.3. MC4J JMX Console
            4. 10.2.9.4. Programmatic Management
          10. 10.2.10. Instrumenting Performance Data Collection
            1. 10.2.10.1. JMS Latency
            2. 10.2.10.2. Instrumenting Collection of Runtime Data
          11. 10.2.11. Summary
        3. 10.3. Solution-Specific Management
          1. 10.3.1. Overview
          2. 10.3.2. Control Bus
          3. 10.3.3. Detour
          4. 10.3.4. Wire Tap
          5. 10.3.5. Message (Route) History
          6. 10.3.6. Message Store
          7. 10.3.7. Test Message
          8. 10.3.8. Channel Purger
        4. 10.4. Chapter Summary
    7. III. Specialized Java CAPS Topics
      1. Eleven. Message Correlation
        1. 11.1. Introduction
        2. 11.2. Overview
        3. 11.3. JMSCorrelationID
        4. 11.4. eInsight Correlations
        5. 11.5. eInsight Correlation Processor: First Cut
        6. 11.6. Correlation Identifier
        7. 11.7. eInsight Correlation Processor: Second Cut
        8. 11.8. Derived Correlation Identifiers
        9. 11.9. Derived Correlation Identifiers: Alternative
        10. 11.10. Message Relationship Patterns
          1. 11.10.1. Header-Items-Trailer Correlation
          2. 11.10.2. Any Order Two Items Correlation
          3. 11.10.3. Any Order Two Items Correlation with Timeout
          4. 11.10.4. Items-Trailer Correlation
          5. 11.10.5. Header-Counted-Items Correlation
          6. 11.10.6. Counted and Timed Items Correlation
          7. 11.10.7. Timed Items Correlation
          8. 11.10.8. Scatter-Gather Correlation
          9. 11.10.9. Message Relationship Patterns Summary
        11. 11.11. eGate Correlation with Dynamic Selectors
          1. 11.11.1. Items-Trailer Correlation
        12. 11.12. Chapter Summary
      2. Twelve. Reusability
        1. 12.1. Introduction
        2. 12.2. Using JMS Request/Reply
        3. 12.3. Using New Web Service Collaborations
        4. 12.4. Using eInsight Subprocesses for Reusability
          1. 12.4.1. Request/Response Subprocess
          2. 12.4.2. OneWayOperation Subprocess
          3. 12.4.3. Notification Subprocess
        5. 12.5. Using eInsight Web Services for Reusability
          1. 12.5.1. Request/Response Web Service
          2. 12.5.2. OneWayOperation Web Service
          3. 12.5.3. Notification Web Service
        6. 12.6. eInsight Service Process Reusability Note
        7. 12.7. Chapter Summary
      3. Thirteen. Scalability and Resilience
        1. 13.1. Introduction
        2. 13.2. Distributing Components
          1. 13.2.1. eGate Component Distribution
          2. 13.2.2. eInsight Component Distribution
        3. 13.3. Exception Handling
          1. 13.3.1. Exceptions in Java Collaborations
            1. 13.3.1.1. JMS-Triggered Java Collaborations
            2. 13.3.1.2. Other Java Collaborations
          2. 13.3.2. Faults in Business Processes
            1. 13.3.2.1. JMS-Triggered Business Processes
            2. 13.3.2.2. Fault Handlers
          3. 13.3.3. Higher-Level Exception Handling
        4. 13.4. Compensation
        5. 13.5. High-Availability Architecture
          1. 13.5.1. Introduction
          2. 13.5.2. Java CAPS Platform Components
            1. 13.5.2.1. Repository
            2. 13.5.2.2. Enterprise Manager
            3. 13.5.2.3. UDDI Registry
            4. 13.5.2.4. Integration Server
            5. 13.5.2.5. Sun SeeBeyond JMS IQ Manager
            6. 13.5.2.6. Sun JMS Grid
          3. 13.5.3. Application Connectivity
            1. 13.5.3.1. Intrasite Failover
          4. 13.5.4. Intersite Failover Architecture
            1. 13.5.4.1. Queue Failover Options
            2. 13.5.4.3. JMS Grid-Based Replication
              1. Level One
              2. Level Two
            3. 13.5.4.3. Queue Manager Disk-Based Replication
          5. 13.5.5. Summary
        6. 13.6. Chapter Summary
      4. Fourteen. Security Features
        1. 14.1. Introduction
        2. 14.2. HTTP Proxy Server Configuration
        3. 14.3. HTTP Basic Authentication
        4. 14.4. Secure Sockets Layer (SSL, TLS)
          1. 14.4.1. HTTP eWay Client and Server Projects
            1. 14.4.1.1. HTTP Server/Responder
            2. 14.4.1.2. HTTP Listener Port Assignments
          2. 14.4.2. HTTP eWay Clear Text Channel
            1. 14.4.2.1. Configuring the Server
          3. 14.4.3. HTTP eWay Server-side Authentication
            1. 14.4.3.1. Configuring the Server
            2. 14.4.3.2. Configuring the Client
          4. 14.4.4. HTTP eWay Mutual Authentication
            1. 14.4.4.1. Configuring the Server
            2. 14.4.4.2. Configuring the Client
            3. 14.4.4.3. Exercising the Channel
          5. 14.4.5. SSL in Java CAPS HTTP eWay Use Notes
          6. 14.4.6. Strong Cipher Suites
          7. 14.4.7. Web Services and SSL
            1. 14.4.7.1. Server-side Authentication Channel
            2. 14.4.7.2. Mutual Authentication Channel
            3. 14.4.7.3. SSL in Java CAPS Web Services Notes
        5. 14.5. Secure Batch FTP Variants
        6. 14.6. Chapter Summary
    8. Bibliography
    9. CD-ROM Warranty

    Product information

    • Title: Java™ CAPS Basics: Implementing Common EAI Patterns
    • Author(s): Michael Czapski, Sebastian Krueger, Brendan Marry, Saurabh Sahai, Peter Vaneris, Andrew Walker
    • Release date: April 2008
    • Publisher(s): Pearson
    • ISBN: 9780137146130