Free Sample
+ Collection

Service Oriented Java Business Integration

Binildas A. Christudas

Enterprise Service Bus integration solutions for Java developers with this SOA book and eBook
RRP $29.99
RRP $49.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781847194404
Paperback436 pages

About This Book

  • Vendor-independent integration of components and services through JBI explained with real-world examples
  • Hands-on guidance to ESB-based Integration of loosely coupled, pluggable services
  • Enterprise Integration Patterns (EIP) in action, in code
  • ESB integration solutions using Apache open-source tools

Who This Book Is For

This book is aimed at Java developers and integration architects who want to become proficient with the Java Business Integration (JBI) standard. Readers should have some experience with Java and have developed and deployed applications in the past, but need no previous knowledge of JBI. The book can also be useful to anyone who is struggling to understand ESB and how it differs from other architectures and to understand its position in SOA.
This book primarily targets IT professionals in the field of SOA and Integration solutions—in other words, intermediate to advanced users. You are likely to find the book useful if you fall into any of the following categories:

  • A programmer, designer, or architect in Java who wants to learn and code in JBI or ESB.
  • A programmer, designer, or architect who doesn't normally code in Java can still benefit from this book, since we 'assemble integration components' using XML with little to no Java code.
  • An IT Manager or an Officer who knows well about SOA or SOI but want to see something in code (you can adorn your flashy presentations with some live code too).


Table of Contents

Chapter 1: Why Enterprise Service Bus
Boundary-Less Organization
Integration Architectures
Enterprise Service Bus versus Message Bus
Making the Business Case for ESB
Enterprise Service Bus
Chapter 2: Java Business Integration
SOA—The Motto
JBI in J2EE—How they Relate
JBI in Detail
Provider—Consumer Contract
Message Exchange Patterns (MEP)
ESB—Will it Solve all Our Pain Points
Chapter 3: JBI Container—ServiceMix
ServiceMix—Under the Hood
ServiceMix Architecture
Other ESBs
Installing ServiceMix
ServiceMix Components—a Synopsis
Your First JBI Sample—Binding an External HTTP Service
Chapter 4: Binding— The Conventional Way
Binding—What it Means
Apache SOAP Binding
Sample Bind a Stateless EJB Service to Apache SOAP
Chapter 5: Some XFire Binding Tools
Binding in XFire
Web Service Using XFireConfigurableServlet
Web Service using XFire Spring XFireExporter
Web Service Using XFire Spring Jsr181 Handler
XFire Export and Bind EJB
XFire for Lightweight Integration
Chapter 6: JBI Packaging and Deployment
Packaging in ServiceMix
Deployment in ServiceMix
Packaging and Deployment Sample
Running the Packaging and Deployment Sample
Chapter 7: Developing JBI Components
Need for Custom JBI Components
ServiceMix Component Helper Classes
Create, Deploy, and Run JBI Component
Chapter 8: Binding EJB in a JBI Container
Component versus Services
Binding EJB Sample
Reconciling EJB Resources
Chapter 9: POJO Binding Using JSR181
ServiceMix servicemix-jsr181
POJO Binding Sample
Accessing JBI Bus Sample
Chapter 10: Bind Web Services in ESB—Web Services Gateway
Web Services
ServiceMix's servicemix-http
Web Service Binding Sample
Chapter 11: Access Web Services Using the JMS Channel
Web Service and JMS
JMS in ServiceMix
Protocol Bridge
Web Service in the JMS Channel Binding Sample
Chapter 12: Java XML Binding using XStream
Java XML Binding
XStream in a Normalized Message Router Sample
Chapter 13: JBI Proxy
Proxy—A Primer
ServiceMix JBI Proxy
JBI Proxy Sample Implementing Compatible Interface
JBI Proxy Sample implementing In-Compatible interface
Invoke External Web Service from the ServiceMix Sample
Chapter 14: Web Service Versioning
Service Versioning—A Means to SOA
Strategy to Version Web Service
Web Service Versioning Approaches
Web Service Versioning Sample using ESB
Web Service Versioning Operational Perspective
Chapter 15: Enterprise Integration Patterns in ESB
Enterprise Integration Patterns
ServiceMix EAI Patterns
EAI Patterns—Code and Run Samples in ESB
Chapter 16: Sample Service Aggregation
Provision Service Order—Business Integration Sample
Chapter 17: Transactions, Security, Clustering, and JMX
Cross Cutting Concerns—Support Inside ServiceMix
Sample Demonstrating Transaction
Sample demonstrating Security
Sample Demonstrating Clustering
Sample demonstrating JMX

What You Will Learn

  • Assembling services and porting them across containers using JBI
  • Exposing EJB as a WSDL-compliant service across firewalls
  • Binding remote services to ESB to be consumed internally
  • Exposing local components in ESB like POJO as externally accessible WSDL-compliant services
  • Providing a web service gateway for external consumers
  • Accessing web services over a reliable transport channel like JMS
  • Implementing web service versioning using ESB
  • Implementing service aggregation at ESB
  • Transactions, Security, Clustering, and JMX in ESB

Chapter 1 begins with a quick tour on Enterprise Integration and the associated issues so that you can better understand the problem that we are trying to solve, rather than following a solution for an unknown problem. We also introduce Enterprise Service Bus (ESB) architecture and compare and contrast that with other integration architectures.

Chapter 2 introduces Java Business Integration (JBI), inspects the need for another standard for Business Integration, and looks into the details of what this standard is all about.

Chapter 3 introduces ServiceMix, which is an open-source ESB platform in the Java programming language, built from the ground up with JBI APIs and principles. It also runs through a few other ESB products.

Chapter 4 looks at how we have been binding services locally or remotely even before the ESB became popular. The chapter demonstrates how tunneling using conventional J2EE tools will help to expose even technology-specific API services. An example of such a service is an EJB service to be exposed through firewalls over HTTP, so that the service becomes technology agonistic.

Chapter 5 introduces XFire, which is a new generation Java SOAP framework to easily expose web services. Here we demonstrate the integration capabilities of XFire.
Chapter 6 teaches you JBI packaging and deployment. After going through this chapter you will be able to build, package, and deploy integration artifacts as standard JBI packages into the JBI container.

Chapter 7 teaches you how to create your own components and deploy them onto the JBI container. This chapter visits the core API from the ServiceMix as well as from the JBI specification, which will function as useful helper classes using which you can develop integration components quickly.

Chapter 8 shows you how to bind Enterprise Java Beans components to the ESB. EJB is the Distributed Component paradigm in the Java-J2EE world and the industry has a lot invested in this technology. Coexisting services with those components will help you to reuse those existing investments so that we can continue building new systems based on higher levels of SOA maturity.

Chapter 9 shows POJO Binding to the ESB using JSR181. POJO components can be easily exposed as WSDL-compliant services to the JBI bus.

Chapter 10 illustrates how to bind web services to the ServiceMix ESB, thus creating a web services gateway at the ESB layer.

Chapter 11 looks at how Java Message Service (JMS), which is a platform-dependent messaging technology, can increase the QoS features of web services by making web services accessible through the JMS channel.

Chapter 12 introduces Java XML binding and XStream, which is a simple open-source library to serialize Java objects to XML and back again. We show the XStream integration with ESB demonstrating streaming of data across the bus.

Chapter 13 visits the JDK Proxy classes and then explains the JBI Proxy in detail with examples. We show a practical use of the JBI Proxy—Proxying the external web services in the JBI bus.

Chapter 14 explains versioning in the SOA context and explains various strategies and approaches to versioning services. It also explains and demonstrates a versioning example leveraging the targetNamespace attribute. Versioning services, especially versioning of web services, is a topic of heated discussion in many forums and sites.

Chapter 15 explains that the EAI patterns are nuggets of advice made out of aggregating basic Message Exchange Pattern elements to solve frequently recurring integration problems. We can look at EAI patterns as design patterns for solving integration problems. This chapter demonstrates many of the common EAI patterns.

Chapter 16 looks into a sample use case. One of the useful applications of ESB is to provide a "Services Workbench" in which we can use various integration patterns available to aggregate services to carry out business processes.

Chapter 17 visits a few selected QoS features such as Transactions, Security, Clustering, and Management, which can impact the programming and deployment aspects using ESB.

In Detail

The goal of Java Business Integration (JBI) is to allow components and services to be integrated in a vendor-independent way, allowing users and vendors to plug and play.

Java Business Integration (JBI) is a specification aiming to define a Service Provider Interface for integration containers so that integration components written for these containers are portable across containers and also integrate with other components or services using standard protocols and formats. JBI is based on JSR 208, which is an extension of Java 2 Enterprise Edition (J2EE).

This book first discusses the various integration approaches available and introduces the Enterprise Service Bus (ESB), a new architectural pattern that facilitates integrating services. ESB provides mediation services including routing and transformation. Java Business Integration (JBI) provides a collaboration framework that provides standard interfaces for integration components and protocols to plug into, thus allowing the assembly of Service-Oriented Integration (SOI) frameworks following the ESB pattern. Once JBI and ESB are introduced, we look at how we have been doing service integration without either of these using traditional J2EE. The book then slowly introduces ESB and, with the help of code, showcases how easily things can be done using JBI.


Read More