Anda di halaman 1dari 70

<Insert Picture Here>

Oracle Service Bus 11g new features for the integration developers
Dmitry Nefedkin ISV 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 Oracle's 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/imc


Contacts: Ruxandra Radulescu, ISV Migration Center Manager EE&CIS, ruxandra.radulescu@oracle.com

Agenda
Product Overview, Key features and benefits OSB 11g new features
Service result caching JCA Transport Enhancement Custom XPath functions Transactional Message Flows Native java support
<Insert Picture Here>

Additional information & resources

Product Overview, Key features and benefits

Oracle Service Bus


Key Ingredients for Enterprise Service Bus
Service Management
Monitoring SLA Alerts Reporting

Service Virtualization
Content Based Routing
Transformation Service Chaining

Configuration Framework
Change Center Validation

Import / Export

Unified Security
Authentication Authorization Identity Sign/Encrypt

Metadata AQ Tux JDBC EJB

Adaptive Messaging
HTTP/S JCA

JMS

SBL JDE PSFT EBS SAP WSRM REST MQ SMTP FTP File

Why a Service Bus?


A few examples

The Point-to-Point problem


Application Service Service Database

Application
Service Application Service Service Service

EJB

SAP

Why a Service Bus?


Example: Location Transparency

Isolate from changes to service location


Service Bus
New Hire Process Route to Host Two

Host One Before


Initialize Benefits Service

Move After Host Two


Initialize Benefits Service

Why a Service Bus?


Example: Backwards Compatibility

Isolate from changes to service contract/interface


Customer Portal

Service Bus <1.0> <2.0>


Transform Message

<2.0>

Process Order Service

CSR App

<1.0> <2.0>

Why a Service Bus?


Example: Service Enablement

Allow multiple protocols/messages to participate in a SOA

Service Bus
Expense Reimbursement Process

SOAP

Transform

JMS

Payroll Service Submit Expense Report Service

FTP
SOAP

Inventory Management App

JMS

Transform

Check Order Status Service

Enabling Agility
With an Enterprise-Class Service Bus
High-speed Intermediary Connect once; loosely coupled Promote service re-use Unlimited scalability Visibility into messages Benefits of Agility Adapt to change Improve re-use
Service Service Service Service Service

Oracle Service Bus

Service

Service

Service

Manage risk
10
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 reporting
11
11

OSB 11g new features

Service result caching

12

Service Result Caching - Overview

Service Provider

Legacy

Oracle Service Bus

Service Consumer

Process Flow / Orchestration

Problem External service is invoked every time for results that may be reasonably static Eg. Product details, discount info Solution Service Result Caching Benefits Faster response times to clients/users Reduce load on potentially slow (legacy) backend systems Cache data is always consistent and available Operational ease in managing cache capacity

13

13

Service Result Caching - Overview


If results not in cache, invoke service & cache results

Service Provider

Oracle Service Bus

Legacy

Side Cache Pattern


Check cache
OSB Result Cache

Service Consumer

Coherence Data Grid


Get / Put (Cachekey) Service Data

Primary Node

Process Flow / Orchestration

Backup Node

B
14

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 cached

15

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 cache
16

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 $outbound/ctx:request/ctx:cache-ttl Not No expiry Default is 5 minutes
cached

>0 Expiry time

17

17

Service Result Caching Feature Highlights


Business Service - Configuration Details

How to calculate the Cache Token

How long the cached result will be kept for

18

18

Service Result Caching Feature Highlights


Global Settings

19

19

Service Result Caching Feature Highlights


Business Service - Operational Settings

20

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 calls
21

21

Result caching demo

22

Result Caching Demo


RequisitionRequestor

Routes to RequisitionRequestor (Business Service) Message has a requisition id

(Proxy Service)

Caching is configured as follows:


RequisitionRequestor (Business Service)

Cache Token is the requisition id 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 id

23

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 file

25

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 file

26

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 resource

27

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 service

28

28

JCA Transport Enhancement - Feature Highlights


OSB JCA Resource Dependency Hierarchy

JCA Service

Concrete WSDL

JCA Resource

Abstract WSDL

TopLink Mapping Resource

XSD/Schema

29

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 invocation
30
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 Expression / resource fn:abs

OSB built-in extensions fn-bea:uuid Oracle XQuery 1.0 engine fn-bea:isUserInRole Custom functions ns0:myfunc

34

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 editor

35

35

Custom XPath functions - Feature Highlights


At start-up, OSB reads the contents of ALSB_HOME\config\xpath-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
Added to OSB

XQuery Engine

%ALSB_HOME%\con fig\xpath-functions directory osb-built-in.xml .properties My-func.xml .properties

classpath

JAR File

JAR File

36

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 Highlights


Contents 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 reorder 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 demo


http://blogs.oracle.com/imc/entry/calling_custom_java_code_from

40

OSB 11g new features

Transactional Message Flows

41

Message Flow Transaction - Overview


Service Clients Application Client
FTP HTTP/SOAP
Proxy

Oracle Service Bus


HTTP
Business

Enterprise Services Service

JMS

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 Protocol
42
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 transaction

43

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 necessary

44

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 Outbound actions endpoint Inbound endpoint

Message Flow response path actions

45

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 Message Flow response path actions TX commit endpoint Inbound endpoint

46

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 userconfigured 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 abort

48

48

Message flow transactions demo


http://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 Clients Application Client Oracle Service Bus
EJB
Proxy Proxy

Services Java Callout

EJB Business Services JMS

EJB JMS

Enterprise Services EJBs Web Services

JMS

HTTP SOAP

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 action
51
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 doesnt 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 queue

53

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
$body

Application Client Register to Object Repository

Request Pipeline

Key1={obj}

<ctx:java-content ref=key1/>

54

54

Native Java Support Feature Highlights


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.

Message format

<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 Callout


55
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 Bus
56
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 context

57

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 service
58
58

Native Java Support Feature Highlights


JEJB Outbound
Oracle Service Bus
JEJB Business Service Request Pipeline

Enterprise 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 EJB

59

59

Native Java Support Feature Highlights


JEJB Outbound
Business Service URI points to the JNDI Provider and JNDI name of the Remote EJB

60

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 service
61
61

Native Java Support Feature Highlights


JMS Transport
JMS Business Service
Oracle Service Bus
JMS Business

JMS Proxy

JMS Queue

Object Message

$body

Request Pipeline

Object Message

JMS Queue

Register the Object with Object Repository

<ctx:java-content ref=jcid" />

Retrieve the Object from Object Repository


62

JMS Services configured with Messaging type Java can receive/send JMS Objects messages Java Object Support for both JMS inbound and outbound

62

Native Java Support Feature Highlights


JMS Transport

Service Type
A new Messaging Service sub-type Java for configuring Java Object support in JMS

63

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 demo


http://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 Nefedkin ISV Migration Center FMW Technical Consultant Dmitry.Nefedkin@oracle.com

Visit our team blog: http://blogs.oracle.com/imc

68

69

70

Anda mungkin juga menyukai