1.18k likes | 1.52k Views
Java Business Integration JSR 208. Chin-Yi Tsai cyt@pmlab.iecs.fcu.edu.tw http://140.134.26.25/~cyt. Integration Difficulties. Enterprise Service Bus. Integration Solution. Services (WS- I ). (interoperability). Components (pluggable) (interoperability).
E N D
Java Business IntegrationJSR 208 Chin-Yi Tsai cyt@pmlab.iecs.fcu.edu.tw http://140.134.26.25/~cyt
Enterprise Service Bus Integration Solution Services (WS-I) (interoperability) Components (pluggable) (interoperability)
JBI Environment / JBI Container Specification(非Java EE 5的一部分)Java Business IntegrationJSR 208 JBI-Compliant Component1 JBI-Compliant Component2
ESB, SOA, JBI • ESB • Architecture technique to integrate incompatible business applications over a common messaging bus. • Unlock and extend your existing systems and technology investments on a modern Service Oriented and Event Driven Architecture • SOA • An architectural principle for structuring systems that SOA emphasizes the de-coupling of system components • ESB & SOA • ESB is one architecture style that abides by the rules of a Service Orientated Architecture. • JBI • Defines common interfaces (SPI) for components and message exchanges and service deployment.
What Does a Service Do • Transform data • Route messages • Query databases • Orchestrate conversations • Apply business logic • Apply business policy • Handle business exceptions • Solicit approvals How Is a Service Implemented? • XSLT • Enterprise JavaBeans. (EJB.) technology • BPEL • SQL • XQuery • Routing Table • Business Rules • EDI Transform
Outline • Overview of JBI • integration • JBI Architecture • SE • BC • NMR • JMX (Management) • Conclusion (Keywords) • Reference • Appendix
Overview of JBI • Standard “meta-container” for services • Standard SPI for plug-in • Service Engines — provide and aggregate services • Binding Components — provide protocols and transports • Loose coupling via WSDL message exchanges • JBI defines an environment for plug-in components that interact using a services model based directly on WSDL 2.0 容器放元件進去 (plug-in) 元件也是一個容器
Component as Container • JBI directly supports the deployment of artifacts to plug-in components, using an archive (ZIP file) package called a service unit.
Component as Container (Cont’d) • Groups of service units are often developed or collected together, to form parts of a larger application or new service that are tested and deployed together. • A group of JBI service units, along with a description of their relationships and target components, is called a service assembly.
Overview of JBI • Java Business Integration (JBI) is a specification developed under the Java Community Process (JCP) for an approach to implementing a service-oriented architecture (SOA). • Creating a standards-based architecture for integration solutions • A suitable standard technology instead of proprietary vendor solution • JBI defines an architecture that allows the construction of integration systems fromplug-incomponents, that interoperate through the method of mediated message exchange.
Overview of JBI (Cont’d) • JBI plug-in components are responsible for providing and consuming services.
JBI Architecture • JBI provides an environment in which plug-in components reside. • The environment provides a set of services to facilitate execution of provided services, interaction between components, as well as management of the overall system created by a JBI installation and all installed components. • JBI provides for interoperation between plug-in components by means of message-based service invocation, described using a standard service description language. • JBI provides a set of services to facilitate management of the JBI environment, including the installed components. This includes component installation and life cycle management services. Plug-in component Message exchange Management
High-level View of JBI Architecture Single JVM Other JVM • SE • BC • NMR • JMX (Management)
Component Framework • JBI components (service engines and binding components) provide interfaces for the use of JBI, and use interfaces provided by JBI. • The JBI framework provides the following for the use of components • Component installation context • Component context • Class loading • Error indication
Application Program SPI DBMS2 JDBC Use JDBC API DBMS1 Standardized Integration • SPI (Service Provider Interface) not API • Allow for proprietary “black boxes” as integration services
Service Engine • Hosts business logic implementing services • Exposes service endpoints • Is a target for deployment — a container
Binding Component • Handles protocol-specific message re-formatting • Should contain no business logic • 與外部服務的溝通
Normalized Message Router • The normalized message router, or NMR, receives message exchanges from JBI components (engines or bindings), and routes them to the appropriate component for processing. • decoupling • The JBI environment's primary function is to route normalized message exchanges from one component to another. • Messages are delivered in a normalized form. normalize NMR normalize component component De-normalize De-normalize
Message Exchange • A Message Exchange (ME) serves as a “container” for the normalized messages that are part of a service invocation. • JBI supports a fixed set of message exchange patterns • a well-defined sequence of message exchanges between the consumer and the provider. • A message exchange pattern (or MEP) no matter what contents (or type) of the messages themselves. By supporting a limited set of MEPs, the JBI standard ensures that components have a simple, well known interaction model to implement, ensuring interoperability.
Normalized Message Exchange (1) • External Service Consumer Message Processing
Normalized Message Exchange (2) • External Service Provider Message Processing
Example • One-way Message Adapter • A message is sent to the JBI environment, transformed, then sent to a destination outside of the environment.
Message Exchange Patterns (MEPs) • An MEP defines the sequence, direction, and cardinality of all messages that occur in the course of invoking and performing the operation. • All message exchanges between consumer and provider are mediated by the NMR. • The components interact with the NMR, using their individual DeliveryChannels • Sending MessageExchange instance • Accepting MessageExchange instance • MEPs • In-only Message Exchange Pattern • Robust In-Only Message Exchange Pattern • In-Out Message Exchange Pattern • In-Optional-Out Message Exchange Pattern
In-only Message Exchange Pattern • Describing a one-way messaging pattern
Robust In-Only Message Exchange Pattern (fault scenario) • Allowing the provider to easily return error responses to in-only message exchange
In-Out Message Exchange Pattern • Normal response
In-Out Message Exchange Pattern (Cont’d) • Fault response
In-Optional-Out Message Exchange Pattern • Normal response 1
In-Optional-Out Message Exchange Pattern (Cont’d) • Normal response 2
In-Optional-Out Message Exchange Pattern (Cont’d) • Provider fault response
In-Optional-Out Message Exchange Pattern (Cont’d) • Provider “done” response
SE Invokes Service Provided by Remote JBI Instance: Robust In with Fault
Management (JMX) • The JBI environment, including bindings and engines, is administered through JMX. (MBean) • Installation of engines and bindings (components) • Life cycle management of components (start/stop controls) • Deployment of component artifacts to engines and bindings that support dynamic additions to their internal execution environments. • Monitoring and control.
Conclusion (Keywords) • JSR 208 (SOA infrastructure/enabler) • Meta-container (JBI Environment / JBI Container) • Plug-in • WSDL 2.0 • JMX (Management) • Messaging (NMR) • SE & BC • ESB enabler • Assembling JBI-compliant component • Installation (AP server, EJB Container, BPEL engine) • Installing it into the JBI environment thanks to JMX based administrative tools • Deployment (BPEL process definition) • JBI component can be seen as a container (ex: BPEL engine) • Services (ex: BPEL) must be deployed into the component thanks to JBI administrative tools • Activation • After deployment, services are accessible through the JBI environment as Endpoints
Sun SOA Home http://www.sun.com/products/soa/index.jsp The Java EE 5 Tutorial http://java.sun.com/javaee/5/docs/tutorial/doc/ Java EE At a Glance http://java.sun.com/javaee/ Project Open ESB https://open-esb.dev.java.net/ LogicBlaze FUSE: Open source SOA platform http://www.logicblaze.com/index.jsp ServiceMix Home http://servicemix.org/site/home.html ActiveMQ Home http://www.activemq.org/site/home.html PETALS Services Platform http://petals.objectweb.org/ Mule Home http://mule.codehaus.org/ Celtix http://celtix.objectweb.org/ JBoss JEMS - The Open Source Platform for SOA http://www.jboss.com/products/soa Oracle Service-Oriented Architecture Technology Center http://www.oracle.com/technology/tech/webservices/index.html Reference
Sun SOA Home http://www.sun.com/products/soa/index.jsp JCP (Java Community Process) http://jcp.org/en/home/index JSR 208 (JBI) http://jcp.org/en/jsr/detail?id=208 Reference (Cont’d)
ESB • ServiceMix • Apache Synapsele • Mule • Celtix • Sun’s Java Open Enterprise Service Bus
ServiceMiX • Open Source JBI Container based on JBI Specification (JSR208) • Supports Transaction Management through Jencks andJava Transaction API (JTA) • Supports Java Message Service (JMS) through ActiveMQ • Can extend any J2EE compliant Server with JBI by simply deploying Servicemix (e.g. Geronimo)
(ServiceMix) Standard Component-Binding Component • HTTP • FTP • File • RSS • Email • SOAP • WSIF (Web Service Invocation Framework) • SAAJ (Soap With Attachments and Apache Axis) • JAX WS (Java API for XML Web Services) • XSQL (XML Query Language) • JMS (Java Message Service)
(ServiceMix) Standard Component-Service Engine • BPE (Container for BPEL) • EIP (Enterprise Integration Patterns) • Groovy (Container for Scripting) • JCA (Java Connector Architecture) • JSR181 (Container for annotated POJOs) • Quartz (Timer) • XPath (Message Transformation with XPath) • XSLT (Message Transformation with XSLT)