this presentation brought to you courtesy of the first
TRANSCRIPT
![Page 1: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/1.jpg)
Founding Sponsors
This Presentation Courtesy of the
International SOA Symposium
October 7-8, 2008 Amsterdam Arena
www.soasymposium.com
Gold Sponsors
Platinum Sponsors
Silver Sponsors
![Page 2: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/2.jpg)
SOA & Java EE: Developing killer SOA applications using the Java EE Platform
Prakash NarayanSun Microsystems
![Page 3: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/3.jpg)
2
Goal
Visualizing and developing composite applications using BPEL, SOA and Java EE
![Page 4: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/4.jpg)
3
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 5: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/5.jpg)
4
Applications
• Developers need to build end-to-end applications> Front-end user interfaces> Middle-tier business logic> Back-end resources
• With the right approach, developers can...> Reuse existing parts> Build new parts> Glue old and new parts together
• With the wrong approach, developers must...> Reimplement functionality existing elsewhere> Spend massive effort to evolve applications
![Page 6: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/6.jpg)
5
Applications
• Real-world applications are...> ...not Web applications> ...not Java EE applications> ...not Swing forms> ...not Web services> ...not BPEL processes> ...not SOA> ...not JBI> ...not RDBMSs> ...not (your favorite technology)
• Real-world applications use many or all of these
![Page 7: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/7.jpg)
6
Applications
• Traditional model of application development> Point technologies, products, and APIs> For example: EJB, Spring, Hibernate, JSF, Servlets, Struts, etc.
> Lots of glue written by developers>Requires a great deal of expertise & time> Inflexible
![Page 8: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/8.jpg)
7
Composite Applications
• A way to compose applications from reusable parts• Comprised of heterogeneous parts> Some existing parts> Some new parts> Some glue to connect these parts
• Composite applications are Applications!> Composite applications != SOA
• Composite applications employ SOA principles> Features exposed as Web services> Standards-based interaction between services> Are themselves composable
![Page 9: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/9.jpg)
8
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 10: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/10.jpg)
9
What Are Services?
• Black-box components with well-defined interfaces> Performs some arbitrary function> Can be implemented in myriad ways
• Accessed using XML message exchanges> Using well-known message exchange patterns (MEPs)
• Services are self-describing• Metadata in the form of WSDL describes...> Abstract interfaces > Concrete endpoints
![Page 11: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/11.jpg)
10
What Can Services Do?
• Perform business logic• Transform data• Route messages• Query databases• Apply business policy• Handle business exceptions• Prepare information for use by a user interface• Orchestrate conversations between multiple services• …
![Page 12: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/12.jpg)
11
How Are Services Implemented?
• Enterprise JavaBeans™ (EJB™) technology• BPEL• XSLT • SQL• Business rules• Mainframe transaction• EDI transform• Humans (yes, really!)• …
![Page 13: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/13.jpg)
12
Example: Purchase Service
BidRequest
BidRequest
Bid
Supplier
LowestBid
Accept/Reject
ShipNotice
Buyer PurchaseService
Accept/Reject
ShipNotice
![Page 14: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/14.jpg)
13
Purchase Service Functions
BuyerEndpoint
SupplierEndpoint
BuyerConversation
SupplierConversation
Transaction Fees
SupplierSelection
Buyer Credit
Supplier Routing
ProductConversion
![Page 15: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/15.jpg)
14
Purchase Service Functions
BuyerEndpoint
SupplierEndpoint
BuyerConversation
SupplierConversation
Transaction Fees
SupplierSelection
Buyer Credit
Supplier Routing
ProductConversion
WSDL/Soap
XQuery
EJB
BPELBPEL
WSDL/Soap
Rule
Routing Table
XSLT
![Page 16: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/16.jpg)
15
Service Oriented Architecture (SOA)
• An architectural principle for structuring systems into coarse-grained services• Technology-neutral best practice• Emphasizes the loose coupling of services• New services are created from existing ones
in a synergistic fashion• Strong service definitions are critical• Services can be re-composed when business
requirements change
![Page 17: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/17.jpg)
16
Benefits of SOA
• Flexible (Agile) IT> Adaptable to changing business needs
• Faster time to market> Reuse existing code> Minimize new development
• Business- and process-driven> Enables new business opportunities
• Greater ROI > Leverage existing IT assets
![Page 18: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/18.jpg)
17
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 19: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/19.jpg)
18
Java EE 5 Overview
• Key development features> EJB 3.0> Annotated “plain old Java object” (POJO) Web services> Powerful Java Persistence API (JPA) for O-R mapping> JAX-WS 2.1 and JAXB 2.1> Samples and blueprints
• Open ESB Starter Kit> Java Business Integration (JBI) runtime> BPEL service engine> SOAP-over-HTTP binding component
• GlassFish V2
![Page 20: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/20.jpg)
19
Java EE Services
• Use EJB 3.0 to develop standards-based worker services> Perform business logic> Access JDBC resources> Call other Web services, including BPEL processes> Transactional> Secure
• JAX-WS 2.1 and JAXB 2.1> Full support for XML Schema> Document-centric services
• Call these services from BPEL processes
![Page 21: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/21.jpg)
20
EJB 3.0 Example@Stateless()@WebService()public class LoanProcessor { @WebMethod public String processApplication(..., @WebParam(name="applicantAge") int applicantAge,...) {
int MINIMUM_AGE_LIMIT = 18; int MAXIMUM_AGE_LIMIT = 65;
String result = "Loan Application APPROVED."
if (applicantAge < MINIMUM_AGE_LIMIT) { result = "Loan Application REJECTED - Reason: Under-aged "+applicantAge+". Age needs to be "+ over"+MINIMUM_AGE_LIMIT+" years to qualify."; return result; } ... } }
![Page 22: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/22.jpg)
21
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 23: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/23.jpg)
22
Need for Business Process
• Developing the web services and exposing the functionality (via WSDL) is not sufficient
• Example:> Concert ticket purchase Web service has 3 operations,
which need to be performed in the following order>Getting a price quote>Purchase a ticket>Confirmation and cancellation
• We also need a way to orchestrate these functionality> Sequencing> Conditional action
![Page 24: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/24.jpg)
23
Business Processes
• Any technology for implementing real-world business processes needs to...> Coordinate asynchronous communication between
services> Correlate message exchanges between partners> Exchange messages in a universal form> Process activities in parallel> Manipulate/transform data between partners> Support long-running business transactions> Handle exceptions> Provide compensation to undo previous actions
![Page 25: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/25.jpg)
24
What is BPEL?
• BPEL = Business Process Execution Language> XML-based language used to specify business
processes based on Web services> Orchestrates partner Web services
• BPEL processes describe...> Long-running, stateful, transactional conversations
• BPEL is one language for implementing a service> A BPEL service is itself a WSDL-described service> Can be used from other services or BPEL processes like
any other Web service
• BPEL processes are easy to write and change
![Page 26: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/26.jpg)
25
What is BPEL?
• Cannot “do” much without other services> Orchestrates other WSDL-described Web services> Can't access non-Web service components> Other partner services do the real work> These are called functional services or worker services
• Excels at...> Parallelism> Long-running conversations> Sending and receiving Web service messages> Complex decision logic> Fault handling and compensating logic
![Page 27: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/27.jpg)
26
BPEL: Relationship to Partners
Orchestrating Process(BPEL)
Partner Service
Partner Service
Partner Service
Partner Service
WSDL
![Page 28: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/28.jpg)
27
BPEL: Relationship to Partners
Orchestrating Process(BPEL)
InventoryChecker Service
Credit checker Service
Another Partner Service
CustomerService
WSDL
![Page 29: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/29.jpg)
28
Example Business Process
Invoke <InventoryService> Invoke <CreditService>
Reply <Invoice>
Receive <PO> <sequence>
<flow>
</sequence>
![Page 30: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/30.jpg)
29
BPEL Document Structure<process>
<partners> ... </partners>
<variables> ... </variables>
<correlationSets> ... </correlationSets>
<faultHandlers> ... </faultHandlers>
<eventHandlers> ... </eventHandlers>
<!-- Business process implementation here -->
<receive> ... </receive>
<reply> ... </reply>
<invoke> ... </invoke>
</process>
![Page 31: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/31.jpg)
30
BPEL Works With WSDL
• Web services are described in WSDL> Operations are message exchanges
> Each operation represents an individual unit of action
• We need a way to orchestrate these operations with multiple web services in the right order to perform a Business process> Sequencing, conditional behavior etc.
• BPEL provides standard-based orchestration of these operations
![Page 32: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/32.jpg)
31
BPEL “Fixes” WSDL
• WSDL describes an unordered set of operations> Operations are grouped as interfaces> Operations are individual message exchanges
• Semantics of the interface are missing in WSDL> Order of invocation> Concurrency> Choreography with external entities
• BPEL can supply these missing semantics
![Page 33: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/33.jpg)
32
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 34: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/34.jpg)
33
NetBeans IDE 6.1● Support for composite applications in NetBeans 6.1● Design BPEL business processes to orchestrate:
● Java EE Web services● External Web services● Other BPEL processes
● Develop secure, identity-enabled Java EE Web services
● Visualize, analyze, and edit real-world XML Schema, WSDL, and XML instance documents
● Download: http://www.netbeans.org
![Page 35: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/35.jpg)
34
Web Service Orchestration● Visually author BPEL 2.0 business processes with
the BPEL Designer● Step-through debugging support● Built-in testing capability for unit testing● “Beyond syntax” validation of Schema, WSDL, and BPEL
● BPEL Mapper● Visually create complex XPath expressions without coding
● Deploy to the built-in BPEL engine● JBI-based BPEL service engine + SOAP/HTTP bindings● Running within the bundled GlassFish V2 Server
![Page 36: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/36.jpg)
35
Types of SOA “NetBeans” Projects
![Page 37: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/37.jpg)
36
BPEL Module Project
• BPEL Module project is a group of source files which includes > XML Schema (*.xsd) files> WSDL files> BPEL files
• Within a BPEL Module project, you can author a business process compliant with the WS-BPEL 2.0 language specification.• Will be added to a Composite application as a JBI
module
![Page 38: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/38.jpg)
37
Composite Application Project
• Composite Application project is a project whose primary purpose is to assemble a deployment unit for the Java Business Integration (JBI) server > BPEL Module projects must be added to a Composite
Application project in order to be deployed to the BPEL runtime.
• The Composite Application Project can also be used to create and execute test cases that can then be run, in JUnit fashion, against the deployed BPEL processes.
![Page 39: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/39.jpg)
38
Composite Application Project
• With a Composite Application project, you can:> Assemble an application that uses multiple project types
(BPEL, XSLT, IEP, SQL, etc.)> Configure external/edge access protocols (SOAP, JMS,
SMTP, and others)> Build JBI deployment packages> Deploy the application image to the target JBI server> Monitor the status of JBI server components and
applications
![Page 40: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/40.jpg)
39
Agenda
Composite ApplicationsServices and SOAJava EE ServicesBPEL in the MixPutting it all together with NetBeansSummaryDemo
![Page 41: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/41.jpg)
40
Summary
• SOA enables flexible and agile enterprise application architecture• Services can be created and used using Java EE• BPEL is a service orchestration language
for creating composite applications• Services can be re-implemented using other
technologies as long as service interfaces are preserved without changing consumers• Java Business Integration (JBI) is the enabling
infrastructure
![Page 42: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/42.jpg)
41
DEMO
![Page 43: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/43.jpg)
42
Call to Action!
• Download NetBeans IDE 6.1 : http://download.netbeans.org/netbeans/6.1/final/
• Join Sun Developer Network (SDN) for up-to-date SOA information:http://developers.sun.com
![Page 44: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/44.jpg)
43
Resources
• http://www.netbeans.org/features/soa/index.html• http://java.sun.com/integration• http://www.sun.com/products/soa• http://blogs.sun.com/gopalan
![Page 45: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/45.jpg)
44
Q & A
• Questions?
![Page 46: This Presentation Brought to you Courtesy of the First](https://reader035.vdocuments.mx/reader035/viewer/2022081403/55517226b4c9057e458b4ae8/html5/thumbnails/46.jpg)
SOA & Java EE: Developing killer SOA applications using the Java EE Platform
Thank [email protected]