Oracle Service Bus 11g: new features for developers
Upcoming SlideShare
Loading in...5
×
 

Oracle Service Bus 11g: new features for developers

on

  • 10,645 views

 

Statistics

Views

Total Views
10,645
Views on SlideShare
9,789
Embed Views
856

Actions

Likes
2
Downloads
415
Comments
0

4 Embeds 856

http://blogs.oracle.com 635
https://blogs.oracle.com 219
http://translate.googleusercontent.com 1
http://web1.conversationminer.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Oracle Service Bus 11g: new features for developers Oracle Service Bus 11g: new features for developers Presentation Transcript

  • <Insert Picture Here>Oracle Service Bus 11g new features for the integration developersDmitry NefedkinISV Migration Center FMW Technical Consultant
  • ISV Migration Center Team• Who we Are ISV Migration Center Team is a team of senior technical consultants based in Eastern and Central Europe and represents Oracles technical investment for partners.• Mission Statement Enable partners to rapidly and successfully adopt and implement Oracle latest technology• What do we Offer Whether you are selling Oracle technology, building business solutions, including hosted Internet solutions or providing system integration and implementation services for Oracle technology, IMC Team can help you succeed.• How can we assist We offer a wide range of free services for partners such as one2one assistance, webinars, seminars and hands-on workshops. Our blog: http://blogs.oracle.com/imcContacts:Ruxandra Radulescu, ISV Migration Center Manager EE&CIS, ruxandra.radulescu@oracle.com 2
  • Agenda• Product Overview, Key features and benefits <Insert Picture Here>• OSB 11g new features – Service result caching – JCA Transport Enhancement – Custom XPath functions – Transactional Message Flows – Native java support• Additional information & resources 3
  • Product Overview, Key featuresand benefits 4
  • Oracle Service BusKey Ingredients for Enterprise Service Bus Service Management Monitoring SLA Alerts Reporting Service Virtualization Configuration Content Based Routing Framework Change Center Transformation Validation Service Chaining Import / Export Unified Security Metadata Authentication Authorization Identity Sign/Encrypt Adaptive Messaging SBL JDE PSFT EBS SAP AQ JDBC HTTP/S JCA JMS WSRM REST MQ SMTP FTP File Tux EJB 5
  • Why a Service Bus? A few examples… • The Point-to-Point problem Application Service Database Service Application EJB Service Service Application Service Service SAP6 6
  • Why a Service Bus? Example: Location Transparency • Isolate from changes to service location Host One Service Bus Before Initialize Benefits New Hire Service Process Route to Host Two Move After Host Two Initialize Benefits Service7 7
  • Why a Service Bus? Example: Backwards Compatibility • Isolate from changes to service contract/interface Service Bus Customer Process Portal <1.0> Transform <2.0> Order Message Service <1.0> CSR App <2.0> <2.0>8 8
  • Why a Service Bus? Example: Service Enablement • Allow multiple protocols/messages to participate in a SOA Service Bus Expense SOAP JMS Transform Payroll Service Reimbursement Process FTP Submit Expense Report Service Inventory SOAP Management App JMS Transform Check Order Status Service9 9
  • Enabling Agility… With an Enterprise-Class Service Bus • High-speed Intermediary • Connect once; loosely coupled Service Service Service Service • Promote service re-use • Unlimited scalability • Visibility into messages Oracle Service Bus • Benefits of Agility Service Service Service Service • Adapt to change • Improve re-use • Manage risk10 10
  • Oracle Service Bus Key Differentiators • Ability to work with services without WSDL – Any Protocol <-> Any Payload • Java integration – POJO – EJBs • Endpoint Management – Service Pooling, Throttling • Advanced Mediation Patterns – Split/Join (Chaining), Dynamic Dispatch • Performance & Scalability – 1000s of services • Change management with zero down-time – Semantic integrity and dependency checking • Built-in management, monitoring and reporting11 11
  • OSB 11g new features –Service result caching 12
  • Service Result Caching - Overview Service Provider Legacy Oracle Service Bus • Problem – External service is invoked every time for results that may be reasonably static Service • Eg. Product details, discount info Consumer • Solution – Service Result Caching • Benefits – Faster response times to clients/users – Reduce load on potentially slow (legacy) backend systems Process Flow / – Cache data is always consistent and available Orchestration – Operational ease in managing cache capacity13 13
  • Service Result Caching - Overview If results not in cache, invoke service & cache results Service Oracle Service Bus Provider Legacy Side Cache Pattern Service Consumer Check cache Coherence Data Grid Primary Node Get / Put (Cachekey) P OSB Service Data Result Cache Process Flow / Backup Orchestration Node B14 14
  • Service Result Caching – Feature Highlights • Uses Oracle Coherence – “Oracle Coherence is an in-memory data grid solution that enables organizations to predictably scale mission-critical applications by providing fast access to frequently used data.” – User MUST install Oracle Coherence when installing Weblogic Server to use Service Result Caching • Single cache for ALL business services • Only valid/correct results from Business Services cached – Errors are NOT cached15 15
  • Service Result Caching – Feature Highlights Key Concepts • Coherence Cache is like java.util.Map – Key + Value – Entries can have a limited lifetime • Cache Key – Service Ref + Operation + Cache Token • Cache Value – Result from invoking Business Service • Cache TTL – How long the result is kept in the cache16 16
  • Service Result Caching – Feature Highlights Key Concepts • Cache Token – Used to correlate request messages with cached values – Can be generated based on request message – Can also be set in the pipeline • $outbound/ctx:request/ctx:cache-token – eg. purchaseOrderId • Cache TTL – Can be generated based on request or response message – Can be set in the pipelne <0 0 >0 • $outbound/ctx:request/ctx:cache-ttl Not No expiry Expiry – Default is 5 minutes cached time17 17
  • Service Result Caching – Feature Highlights Business Service - Configuration Details How to calculate the Cache Token How long the cached result will be kept for18 18
  • Service Result Caching – Feature Highlights Global Settings19 19
  • Service Result Caching – Feature Highlights Business Service - Operational Settings20 20
  • Service Result Caching – Feature Highlights Dashboard - Service Health How often the external service is invoked How often the cache is hit How often the cache is hit compared to the total number of calls21 21
  • Result caching demo 22
  • Result Caching Demo RequisitionRequestor Routes to RequisitionRequestor (Business Service) (Proxy Service) • Message has a requisition id Caching is configured as follows: RequisitionRequestor • Cache Token is the requisition id (Business Service) • Expiration Time is 1 minute Represented in the demo by the RequisitionProvider (ProxyService) which Legacy • Waits 5 seconds (to simulate a slow legacy system) • Returns a requisition for the given requisition id23 23
  • OSB 11g new features –JCA Transport Enhancement 24
  • JCA Transport Enhancement - Feature Highlights Support for new 11g JCA adapter artifacts - 10g JCA WSDL is no longer supported - Support 11g JCA artifacts created in JDeveloper with SOA plugin 11.1.1.3 or later: JCA file, abstract WSDL, Schema, EclipseLink Mapping File - Support both EclipseLink and TopLink mapping file25 25
  • JCA Transport Enhancement - Feature Highlights • New OSB resource type jca for JCA Files - JCA resource stores JCA files - JCA resource has dependency on WSDL - JCA resource might have dependency on TopLink Mapping file26 26
  • JCA Transport Enhancement - Feature Highlights • New XML resource type for TopLink Mapping File - We have introduced a new resource type XML for storing TopLink Mapping Files. - TopLink Mapping File is no longer stored in JCA transport endpoint - JCA resource may have dependency on TopLink Mapping File XML resource27 27
  • JCA Transport Enhancement - Feature Highlights • Improved user experience for creating JCA service in OSB console - User no longer have to walk through the conventional service creation wizard to create JCA proxy/business service - A resource action button is provided for each JCA resource for creating JCA proxy/business service and a concrete WSDL. • Improved user experience for creating JCA service in Eclipse IDE - Right click menu on JCA file provides link for generating JCA service28 28
  • JCA Transport Enhancement - Feature Highlights • OSB JCA Resource Dependency Hierarchy JCA Service Concrete WSDL JCA Resource Abstract WSDL TopLink Mapping Resource XSD/Schema29 29
  • JCA Transport Enhancement - Feature Highlights • Support for Normalized Message Properties via Transport Headers - Normalized Message Properties for SOA JCA adapters are represented by JCA transport headers in OSB. - Inbound Normalized Message Properties are converted to transport headers by JCA proxy service - Transport headers are converted to Normalized Message Properties during JCA business service invocation30 30
  • JCA Transport Enhancement - Feature Highlights • Added new adapter certification for File and BAM - OSB 11g certified File and BAM adapter in addition to DB, AQ, OracleApps, SAP, PeopleSoft, Siebel, JDE adapters. • Seamless upgrade for 10g JCA artifacts to 11g - When importing OSB config jar with 10g JCA artifacts, there will be automatic upgrade for JCA artifacts from 10g to 11g. - JCA WSDL will be upgraded to JCA file, abstract WSDL, and concrete WSDL. - JCA proxy and business service will be upgraded to 11g JCA service and EclipseLink Mapping File XML resource.31 31
  • JCA Transport Demo 32
  • OSB 11g new features –Custom XPath functions 33
  • Custom XPath functions - overview • The goal: Give customers the ability to extend the set of standard functions used in XQuery expressions and XQuery/XSLT resources with their own implementations, written in Java. • The rationale: Certain transformations are too complicated or too inefficient to be done with XQuery/XSLT language. For example, reuse utility complex transformation functions already existing in java or even to do something with a database or some external system. XQ Standard functions fn:concat OSB XQuery fn:abs Expression / resource … OSB built-in extensions fn-bea:uuid Oracle fn-bea:isUserInRole XQuery 1.0 engine … Custom functions ns0:myfunc34 34
  • Custom XPath functions - Feature Highlights Typical development process – Write java code to implement function – Compile and package up corresponding .class files in a jar file – Put jar file in OSB xpath-functions directory (or server classpath) – Add new .xml and .properties files into xpath-functions directory – Restart OSB server(s) – Voilà: you should be able to see and use the new functions in XQuery expression editor35 35
  • Custom XPath functions - Feature Highlights At start-up, OSB reads the contents of ALSB_HOMEconfigxpath-functions directory and – For each .XML file it finds, it goes through the list of functions in it and “registers” them with XQuery engine. – Each function gets an XQuery signature based on its Java signature – For each .JAR file it finds, it will add it to classpath when evaluating results of XQuery expressions register new functions … OSB Runtime XQuery Engine Added to OSB classpath %ALSB_HOME%con figxpath-functions directory osb-built-in.xml My-func.xml JAR File JAR File .properties .properties36 36
  • Custom XPath functions - Feature Highlights Contents of configuration XML file For each new function: – Category id (key in .properties) – (optional) Group id (key in .properties) – Name – Namespace – Java signature – Deterministic or not (always produces same result for same arguments)37 37
  • Custom XPath functions - Feature HighlightsContents of configuration XML file<?xml version="1.0" encoding="UTF-8"?><xpf:xpathFunctions xmlns:xpf="http://www.bea.com/wli/sb/xpath/config"> <xpf:category id="%CUSTOM_STRING_FUNC_CAT%"> <xpf:function> <xpf:name>reverse</xpf:name> <xpf:comment>%FUNC_REVERSE_COMMENT%</xpf:comment> <xpf:namespaceURI>http://www.oracle.com/sample/osb/custom/StringUtils</xpf:namespaceURI> <xpf:className>com.oracle.sample.osb.custom.StringUtils</xpf:className> <xpf:method>java.lang.String reverse(java.lang.String)</xpf:method> <xpf:isDeterministic>true</xpf:isDeterministic> <xpf:scope>Pipeline</xpf:scope> <xpf:scope>SplitJoin</xpf:scope> </xpf:function> </xpf:category></xpf:xpathFunctions> 38
  • Custom XPath functions - Feature Highlights Rules for writing Java code – Only a subset of Java data types is supported (e.g. Strings, primitives, dates, times, XMLObject and DOM Element, …) – Only single-dimensional arrays of supported types are allowed – Functions with side-effects should not be used (e.g. DB updates or starting/committing TX), since the XQuery optimizer might re- order or eliminate certain calls as it sees fit – Functions with void return are not supported. Using Java callout is more appropriate in these scenarios.39 39
  • Custom XPath functions demohttp://blogs.oracle.com/imc/entry/calling_custom_java_code_from 40
  • OSB 11g new features –Transactional Message Flows 41
  • Message Flow Transaction - Overview Service FTP Oracle Service Bus Enterprise Clients Services HTTP HTTP/SOAP Proxy Business Application Service JMS Client JMS Atomic Message Flow • Simple as checking a box • All transactional work in message flow committed or aborted • E.g. Publish, Service Callouts (QOS EO), Reporting, Java Callout, Route Two settings for Proxy • Transaction Required ? • Same Transaction For Response ? Benefits • Message flow can execute within TX regardless of the Inbound Protocol42 42
  • Message Flow Transaction – Feature Highlights • Any proxy can use a transaction so that the transactional work done by the proxy is atomic, i.e. all committed or all aborted  Transactions are declarative, i.e. a setting on the proxy service – there are no pipeline actions to start/commit TX • Both the request actions and response actions of a message flow (i.e. entire message flow) for a given proxy can execute in the context of the same transaction43 43
  • Message Flow Transaction – Feature Highlights New options in proxy service configuration If checked, OSB will ensure there is a transaction context in message flow by starting a transaction if necessary44 44
  • Message Flow Transaction – Feature Highlights “Transaction Required” setting • If “TX Required” is set, when OSB starts a transaction, any request path action executes in the context of this transaction • This TX will get propagated to response path only if inbound endpoint is synchronous, e.g. HTTP, SB, JEJB TX begin TX commit Message Flow request path actions Outbound endpoint endpoint Inbound Message Flow response path actions45 45
  • Message Flow Transaction – Feature Highlights For a one-way or async endpoint (e.g. JMS, Email, File, FTP): If “Same TX for response” is set, the entire message flow (request AND response actions) execute in the context of the same transaction, regardless of whether the inbound endpoint is synchronous, asynchronous or one-way TX begin Message Flow request path actions Outbound endpoint endpoint Inbound Message Flow response path actions TX commit46 46
  • Message Flow Transaction – Feature Highlights • If the inbound transport already starts a TX (e.g. File, FTP, Email, SFTP, JMS XA, WS, Tux, SB, JEJB, …) then: – “TX Required” flag is a NO-OP – “Same TX For Response” flag will • be a NO-OP for synchronous transports (SB, Tux, JEJB) because TX gets propagated to response path by default in these cases • cause the response path to use the same (inbound) TX for async or one-way transports (File, FTP, Email,…)47 47
  • Message Flow Transaction – Feature Highlights Error handling – TX-related errors (begin/commit/etc.) cannot be handled by user- configured error handlers – When OSB starts TX, any unhandled exceptions in OSB will cause TX to be aborted – With “Same TX for response” set that is true whether the exception occurs on request OR response path – Reply With Failure will also cause TX to be aborted – Reply With Success/Resume will NOT cause TX abort48 48
  • Message flow transactions demohttp://blogs.oracle.com/imc/entry/how_to_control_the_transaction 49
  • OSB 11g new features –Native java support 50
  • Native Java Support - Overview Inbound and Outbound Service Oracle Service Bus Enterprise EJB EJB Clients Proxy Proxy Services EJB Services Application Java Callout Business Services JMS EJBs Client JMS JMS HTTP Web SOAP Services • Support for handling Java Objects in OSB • UseCases – Mediate EJB invocation to leverage the monitoring, alerting and reporting capabilities of OSB – Expose pipeline as a SLSB (Stateless Session Bean) – Java Object or POJO (Plain Old Java Object) manipulation in the pipeline using Java Callout action51 51
  • Native Java Support – Overview JEJB transport • New native EJB (JEJB) Transport – Both Inbound and Outbound – Supports 2.1 and 3.0 – Native Java Objects can be passed along to JMS, Java Callout – Full Transaction and Security semantics supported • JEJB Transport vs existing EJB Transport – JEJB Transport supports both Inbound and Outbound whereas EJB Transport supports only Outbound. – JEJB Transport doesn‟t convert Java Objects to XML representation.52 52
  • Native Java Support – Overview JMS transport enhancements • Enhanced existing JMS transport to support JMS Object messages – Allow picking up messages of type Object from a JMS topic or queue – Allow dropping messages of type Object off into a topic or queue53 53
  • Native Java Support – Feature Highlights Java object in the pipeline • OSB enhanced to support Java Objects • In the Pipeline, Java Object is represented as <ctx:java-content ref=”key1” Request xmlns:ctx="http://www.bea.com/wli/sb/context”/> Pipeline POJOs Transport Layer Request Application Pipeline $body Client Register to Object Repository <ctx:java-content Key1={obj} ref=“key1”/>54 54
  • Native Java Support – Feature Highlights Message format • Message Format in the Pipeline – The invocation point is the top element – Each argument is listed as a sub-element – Primitives and string arguments are inlined – POJO parameters referred by java-content ref. <soap:Body> <tes:some-method xmlns:tes=”default/someURI" <arg0>99</arg0> <arg1>true</arg1> <arg2><con:java-content ref=”key1” xmlns:con="http://www.bea.com/wli/sb/context”/></arg2> <arg3><someXML .../></arg3> </tes:some-method> </soap:Body> – XmlObject arguments can be inlined or passed as ref. • POJOs can only be modified in the pipeline through Java Callout55 55
  • Native Java Support – Feature Highlights JEJB Inbound Invocation Point = “Method1” Args= {Pojo1, …} Stateless Session Bean Request Pipeline Client Application Method1 Result Method1(Pojo1,…) Response Pipeline Method2(Pojo2,…) • Inbound EJB Transport exposes the Pipeline as a Stateless Session Bean – Communication between the client and proxy service is an EJB invocation – Client defines the SLSB interface exposed by the JEJB Proxy service – EJB artifacts are generated on the fly at the time of proxy creation • Transaction and security context is propagated from the client into the Bus56 56
  • Native Java Support – Feature Highlights JEJB Inbound • The URI for the EJB Proxy Service is a part the global JNDI name for locating the EJB within the remote JNDI context57 57
  • Native Java Support – Feature Highlights JEJB Inbound • User Configurations: – Dispatch Policy – EJB Spec Version – Pass XMLBeans by value – Transaction Attribute – Client Jar • Client Jar contains the remote/home or business interfaces to be exposed by the proxy service. User selects the EJB interface to be exposed by the JEJB Proxy service58 58
  • Native Java Support – Feature Highlights JEJB Outbound Oracle Service Bus JEJB Business Service Enterprise Request Pipeline Services Result EJB Response Pipeline Invocation Point = “Method1” Args= {Pojo1, …} • Outbound EJB Transport is targeted to invoking Stateless Session Beans from the Pipeline • Transaction and security context is propagated from JEJB business Service to the external EJB59 59
  • Native Java Support – Feature Highlights JEJB Outbound Business Service URI points to the JNDI Provider and JNDI name of the Remote EJB60 60
  • Native Java Support – Feature Highlights JEJB Outbound User Configurations: – Dispatch Policy – EJB Spec Version – Pass XMLBeans by value – Security Information – Client Jar • Client Jar contains the remote/home or business interfaces to be accessed by the Business Service. User selects the EJB Interface to be accessed by the JEJB Business service61 61
  • Native Java Support – Feature Highlights JMS Transport JMS Business Oracle Service Bus JMS Business JMS Proxy Object Object Service JMS Message $body Message JMS Request Queue Pipeline Queue Register the Object with Object Retrieve the Object from Object Repository <ctx:java-content ref=”jcid" /> Repository • JMS Services configured with Messaging type „Java‟ can receive/send JMS Objects messages • Java Object Support for both JMS inbound and outbound62 62
  • Native Java Support – Feature Highlights JMS Transport • Service Type – A new Messaging Service sub-type “Java” for configuring Java Object support in JMS63 63
  • Native Java Support – Feature Highlights JMS Transport • Pipeline Message Format – Object in the pipeline is represented by the XML snippet containing the reference of the stored object <soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <ctx:java-content ref=”jcid” xmlns:ctx="http://www.bea.com/wli/sb/context" /> </soap:Body>64 64
  • JEJB transport demohttp://blogs.oracle.com/imc/entry/how_to_mediate_ejb_invocation 65
  • Additional information & resources 66
  • Additional information & resources• Oracle Service Bus documentation: http://www.oracle.com/technetwork/middleware/service-bus/documentation/index.html• OTN “Learn More” page - books, tutorials, etc: http://www.oracle.com/technetwork/middleware/service-bus/learnmore/index.html• OSB samples: https://www.samplecode.oracle.com/sf/go/page1498• OSB Workshops provided by ISV Migration Center.If you want to attend the workshop, please contact Ruxandra Radulescu at ruxandra.radulescu@oracle.com 67
  • Q&A Dmitry NefedkinISV Migration Center FMW Technical Consultant Dmitry.Nefedkin@oracle.comVisit our team blog: http://blogs.oracle.com/imc 68
  • 69
  • 70