You are on page 1of 35

JBoss ESB 4.

2 Deep Dive

Burr Sutter

May 16 2007
JBossESB Deep Dive Webinar May 16

• Describe and demonstrate as many of the ESB 4.2


capabilities as possible in one hour.
• Please try to hold your questions until the end. The Q&A
portion of this presentation will be conducted via the
Elluminate chat window AFTER the completion of the
formal presentation.
• We can repeat this session as needed, as available – our
first scheduled repeat is May 22nd 11:00 AM Eastern
• ESB 4.2 MR2 is available for download:
http://labs.jboss.com/jbossesb/
• Join our email list for future ESB announcements:
https://lists.jboss.org/mailman/listinfo/esb-announce
• The PDF of the slides will be available to attendees after
the session.

Questions: burr.sutter@jboss.com
A Real World Scenario

ASCII
ASCII

File System
File System
Source
System
ASCII FTP
FTP

MSG MQ
FTP
MQ
GET

Data
Data Socket
Socket
JMS
Listener
SQL
SQL
TCP/IP
Socket

JDBC/ODBC
Select
Update

Questions: burr.sutter@jboss.com
The ESB Solution

ASCII

ASCII
File System
Receiving
File System System 1
Source XML
System JBoss ESB

JMS

Receiving
System 2
ASCII
ASCII
JMS XML
File System
FTP
Receiving
SOAP
System 3
Receiving
System N

Questions: burr.sutter@jboss.com
Enterprise Service Bus
Event Listeners and Actions Pluggable Architecture Business Services
provide transport and for integrating infrastructure services runs within a container or
transport mediation standalone

Transports HTTP(S)
Infrastructure
Business Service
Services
FTP Components

Transformation Routing Security Management


Java EE 5
File
ASCII Web Services
XML JMS
Binary
JBoss ESB EJB3 JCA

Email
POJOs

SQL
Notification Orchestration Service Component Architecture
Service Event &
Hibernate Registry Store Composition Service Data Object
Engine

Socket BPEL
jPDL Business
Data
SOAP
Excel
* Transformation includes: RDBMS
Browser Web Message Normalization, Legacy
Validation, Enrichment, COTS
Seam Rules-based Process
Portal and XSLT transforms Store

Questions: burr.sutter@jboss.com
ESBs Across The Enterprise
HTTP/S Business
Transformation Routing Security Management Service
FTP

JSR 181 POJOs


File
JBoss ESB
JMS
EJB3 JCA Invoicing/Order Entry
POJO
Email
Service Event Composition
SOAP Registry Store Engine

BPEL
Notification Business
Web jPDL
Data
Scripting Process
Seam Store

Portal

Web Order Entry


Accounting
File
Routing Security
SOAP FTP

Shared
ESB

File
JBoss ESB
Composition
Engine
Distributed Email
Service
Process
Store BPEL
Registry Registry SOAP
Event Composition
Service
Registry Store Engine
Process
BPEL
Plus Lightweight ESB Notification
Store

Architecture

Questions: burr.sutter@jboss.com
Service Federation
Warehouse Services

Shipping Calc
Shipping Calc
Shipping Calc
Order Services Inventory Check
Inventory Check
Inventory Check
Inventory Update
Order Validation Inventory Update Process Store
Order Validation Inventory Update
Credit Check
Credit Check
Routing Services
Registry
& Messaging

Customer Services
Rules Services Cluster
Customer Inquiry
Customer Inquiry
Customer Update
Customer Update
Accounting
Accounting

Transformation Services Cluster


* JVM
Questions: burr.sutter@jboss.com
Enterprise Service Bus
Q6 2006 Mid 2007 Partners Future

Event Listeners and Actions Pluggable Architecture Business Services


provide transport and for integrating infrastructure services runs within a container or
transport mediation standalone

Transports HTTP(S)
Infrastructure
Business Service
Services
FTP Components

Transformation Routing Security Management


Java EE 5
File
ASCII Web Services
XML JMS
Binary
JBoss ESB EJB3 JCA

Email
POJOs

SQL
Notification Orchestration Service Component Architecture
Service Event &
Hibernate Registry Store Composition Service Data Object
Engine

Socket BPEL
jPDL Business
Data
SOAP
Excel
* Transformation includes: RDBMS
Browser Web Message Normalization, Legacy
Validation, Enrichment, COTS
Seam Rules-based Process
Portal and XSLT transforms Store

Questions: burr.sutter@jboss.com
The Modern Silo
Browser

Web Pages: Struts, JSF, Tapestry

DAO/JPA/SLSB/Spring Bean
App Hibernate

DB Query/Stored Procedure

Questions: burr.sutter@jboss.com
Intermediate those Silos
Browser Rich B2B Legacy

Mediation Service 1 Service 2 Service 3

DAO/JPA/SLSB/Spring Bean
App Hibernate

Mediation Service 4 Service 5 Service 6

DB Query/Stored Procedure

Questions: burr.sutter@jboss.com
Demo 1
JBossESB 4.2 provides
• Message delivery
– JMS (JBossMQ, JBoss Messaging, ActiveMQ, MQSeries, Oracle AQ)
– (S)FTP, SOAP, HTTP, email, database, shared file system
• Action chaining/pipeline
– For custom service enablement & mediation
• Transformation
– XSLT, Java, Groovy, StringTemplate
• Content-based routing
– JBoss Rules, XPath DSL
– Recipient List/Static Routing is also supported
• Orchestration
– BPM, Intelligent routing, EIPs and hot deployment
• Registry
– JAX-R based
– UDDI support out-of-the-box (Scout and jUDDI)
• Message Store
• Gateways
• Extensive examples and documentation
• And more…

Questions: burr.sutter@jboss.com
JBoss ESB 4.2 Roadmap
• JMX Microkernel • Advanced Splitter/Aggregator
• Federated Clustering • Content Based Filter
• WS-* • Business Rules Action
– SOAP 1.2 • Native Process Orchestration
– WSDL 1.1
• Improved SQL Gateway
– 181 Annotated POJO Endpoints
– EJB 2.1 and EJB 3.0 Endpoints • Hibernate Gateway/Listener
– JAXB 2.0 • HTTP Gateway/Listener
• BPEL 2.0 • Groovy Action
• Message Store Actions
• JCA Container
• Additional EIP examples

Questions: burr.sutter@jboss.com
ESB Transformation Engine

• Validation
• Enrichment
• Inline transformations (Fragment based Processing)
• Profile based XML/non-XML processing
• Anything to Anything (XML, CSV, binary, X12, POJO)
• Mix/Match transformers on a single message:
– Java
– Groovy
– StringTemplate
– XSLT
• 4X performance boost over plain XSLT (Xalan):
http://milyn.codehaus.org/Chiba+Integration

Questions: burr.sutter@jboss.com
jboss-esb.xml

• Configuration for one or more services which show


up in the registry.
• Deployed as the key element of a .esb archive in 4.2+
• Structure of a .esb archive

META-INF

jboss-esb.xml

com.mycompany.soa.mycustom.actions

MyCustomAction.class

Tip: Use one of the quickstarts as your template for your new project. We do
assume that you are comfortable with Ant. An Eclipse Project template is under
Development and will be available in SVN soon (as of May 16, 2007)

Questions: burr.sutter@jboss.com
Hello World – jboss-esb.xml 1
<?xml version = "1.0" encoding = "UTF-8"?>
<jbossesb
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schema
s/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5">

<providers>
<jms-provider name="JBossMQ"
connection-factory="ConnectionFactory">

<jms-bus busid="quickstartGwChannel">
<jms-message-filter
dest-type="QUEUE"
dest-name="queue/quickstart_helloworld_Request_GW"/>
</jms-bus>
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-type="QUEUE"
dest-name=" queue/quickstart_helloworld_Request_ESB"/>
</jms-bus>

</jms-provider>
</providers>

Questions: burr.sutter@jboss.com
Hello World – jboss-esb.xml 2
<services>
<service
category="FirstServiceESB"
name="SimpleListener"
description="Hello World">
<listeners>
<jms-listener name="JMS-Gateway"
busidref="quickstartGwChannel"
maxThreads="1"
is-gateway="true"/>
<jms-listener name="helloWorld"
busidref="quickstartEsbChannel"
maxThreads="1"/>
</listeners>
<actions>
<action name="action1"
class="quickstart.helloworld.MyListenerAction"
process="displayMessage"/>
</actions>
</service>
</services>

</jbossesb>

Questions: burr.sutter@jboss.com
Hello World - action
package org.jboss.soa.esb.samples.quickstart.helloworld;

import org.jboss.soa.esb.message.Message;

public class MyListenerAction


{
public Message displayMessage(Message message) {
System.out.println("Body: " + new
String(message.getBody().getContents()));
// modify the contents, do anything Java can do…
return message; // always return the message for the “chain”
}

public MyListenerAction(ConfigTree config) {


// this constructor will be used to handle any jboss-esb.xml
} // custom property configuration

Questions: burr.sutter@jboss.com
Action Pipeline (in a Service)
Actions are reusable mediation components that can be chained
together to form the capabilities of a registered service. Actions
can be dynamically added/removed at runtime.
My_Registered_Service

Business
FTP Action Action Action Action Action Logic
Component

Business Logic:
• POJO
Transformation Routing Logging Business
CSV to XML Splitter Audit Logic • EJB
or Trail Invocation • WS
BPM • Rules
Transformation • JCA with Adapters
XML to POJO • Anything with Java API

This box can also represent the ESB’s JVM – actions are “in VM”

Questions: burr.sutter@jboss.com
Demo 2
Enterprise Integration Patterns

File Transfer
Recipient List

Channel
Router/CBR
Message

Splitter
Message Filter

Aggregator
Message Store
Translator/Transformer

Enricher
Wire Tap

Process Manager

Content Filter

More information at
www.enterpriseintegrationpatterns.com
Questions: burr.sutter@jboss.com
Routing, Services & Actions
A_Service

SOAP Action EJB DB

B_Service

ASCII FTP Action Action POJO DB


XML
Binary

C_Service D_Service

JMS Action JMS Action WS DB

Questions: burr.sutter@jboss.com
Content Based Routing
Orders over 12K or from Platinum customers
Platinum_Service

SOAP Action

Ordering_Service

FTP Action POJO DB


ASCII
XML
Binary
Special_Handling

SOAP Action EJB

DB
Randomly grab orders for review – tracer and
Keep a total of all orders flowing through the system
Orders from customers in certain states/countries

Questions: burr.sutter@jboss.com
Content Based Routing Engine
• Currently based on JBoss Rules – supports XPATH DSL
• Access to the complete Header and Body/Contents for evaluation
• Zero to many destinations
rule "Routing Rule using XPATH Greater"
when
xpathGreaterThan "/Order/@totalAmount", "50.0"
then
Log : "Really It's EXPRESS Shipping";
Destination : "ExpressShipping:ExpressShippingService";
end

rule "Routing Rule using XPATH Less"


when
xpathLessThan "/Order/@totalAmount", "50.0"
then
Log : "Really It's NORMAL Shipping";
Destination : "NormalShipping:NormalShippingService";
end

Destination : “ServiceCategory:ServiceName”

Questions: burr.sutter@jboss.com
Splitter/Aggregator Quickstart
Also demonstrates, federated ESB, multi-JVM capabilities

Inbound Splitter

JMS Action

Red

JMS Action

Green Aggregator_Service

JMS Action JMS Action

Blue

JMS Action

Questions: burr.sutter@jboss.com
Demo 3
Orchestration (Got Flow)
Simple Order Handling Process

Customer Submit Order Issues

Customer
Receive Order Validate Order CSR Teams
Service

Credit
Credit Check
Agency

Warehouse Inventory Check Send Shipment

Shipper Handle Shipment

Customers submit orders via web browser, FTP and Web Services.
The system receives and validates the order, errors are sent to the appropriate CSR Team
A credit check request is made, any areas of concern are sent to the appropriate CSR Team
An inventory check request across multiple warehouses is sent, lack of availability goes to the CSRs.
Assuming the order is valid, checks credit and available inventory, pick tickets are printed, shipping
labels are printed, someone throws the parts into a crate or places on a pallet and puts the package
by the loading dock. Various shipping companies are employed.

Questions: burr.sutter@jboss.com
Service Oriented Orchestration
Customer Submit Order Issues

Customer
Receive Order Validate Order CSR Teams
Service

Credit
Credit Check
Agency

Warehouse Inventory Check Send Shipment

Shipper Handle Shipment

Validate Order Credit Check


a Parse XML a Create Outbound Msg
b Transform b Handle Response Send Shipment
c Apply Business Rules c Apply Business Rules a Determine Shipper(s)
b Print Labels
c Print Pick Tickets
Inventory Check d Create & Send ASNs
a Send to N Warehouses
ESB Mediates b Handle N Responses
& Provides Services c Determine Best WHSEs
d Handle Drop-Ships

Questions: burr.sutter@jboss.com
Service Orchestration & BPM

Humans Customer CSR Sales Mgmt WHSE Mgmt

Submit Order Issues


FTP
Receive Order Validate Order CSR Teams
Credit Check
SOAP Inventory Check Send Shipment
Handle Shipment
File

Validate Credit Inventory Send


Order Check Check Shipment

Various Transports

J2EE App
External Credit/Bank Legacy Partners
Server

An ESB Service is visible in the UDDI registry automatically. A single ESB Service may or may
not expose a WSDL. It may use out-of-the-box actions, custom actions and/or consume external
services from various sources. Focus on the reuse of existing infrastructure and assets.
Questions: burr.sutter@jboss.com
Orchestrated/Composed Services
JVM
BPM

External
Actor Validation_Service

Action DAO DB

External
Actor Pricing_Service

Action POJO DB

External
Actor Order_Service

Action Action EJB DB

Questions: burr.sutter@jboss.com
Orchestration Designer

Questions: burr.sutter@jboss.com
Demo 4
BPEL

• We are partnering with Active Endpoints


• www.activebpel.org
• Download their open source BPEL engine and
contact them for their free design tool.
• As for ESB 4.2 MR2, review the webservice_bpel
quickstart, specifically the ActiveBPEL-
Orchestration.pdf under that quickstart’s Docs
folder.
• And engage us in the online forums:
http://www.jboss.com/index.html?module=bb&op=viewforum&f=246

Questions: burr.sutter@jboss.com
Possible Big Picture
.NET
SOAP
Application

JVM
Enterprise Service Bus

BPEL Service A Groovy


O Action
Partner JMS R
Link C Rules
S H Service B
E E Action
WS SOAP
Partner
SOAP
R S Spring
Link V T Service C
Client I R
C A Action
E T EJB
Partner
Link I Service D
DB
FTP O
Action
N DAO

Application Server
Note: Not every technology is required.
This is simply a way to illustrate how
Legacy
the various technologies might be used SOAP
together Application

Questions: burr.sutter@jboss.com
Conclusions

• Open Source will make SOA happen


• It is NOT all about Web Services
• ESB a solution for application/process integration.
• ESB is about service intermediation.
• JBossESB architecture is key to flexibility and
future-proofing
– Forms the backbone of our SOA strategy
• DOWNLOAD ESB 4.2 MR2

Questions: burr.sutter@jboss.com

You might also like