Oracle Service Bus 11g: new features for developers
-
Upload
oracleimc-isv-migration-center -
Category
Technology
-
view
10.698 -
download
1
Transcript of Oracle Service Bus 11g: new features for developers
![Page 1: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/1.jpg)
<Insert Picture Here>
Oracle Service Bus 11g new features for the integration developers
Dmitry Nefedkin
ISV Migration Center FMW Technical Consultant
![Page 2: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/2.jpg)
2
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, [email protected]
![Page 3: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/3.jpg)
3
<Insert Picture Here>
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
• Additional information & resources
![Page 4: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/4.jpg)
4
Product Overview, Key features
and benefits
![Page 5: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/5.jpg)
5
Oracle Service BusKey Ingredients for Enterprise Service Bus
Unified Security
FTPMQ
Adaptive Messaging
SMTP
Metadata
ReportingSLA Alerts
Content Based Routing
Transformation
Import / Export
Validation
Service Management
Service Virtualization Configuration
Framework
HTTP/S JCA JMS File
Change Center
Monitoring
WSRM Tux EJB
Service Chaining
REST
Authentication Authorization Identity Sign/Encrypt
JDBCAQSAPEBSPSFTJDESBL
![Page 6: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/6.jpg)
6
Why a Service Bus? A few examples…
6
• The Point-to-Point problem
Service
Service
Service
Service
Application
Application
Application
Service
Service
Database
EJB
SAP
![Page 7: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/7.jpg)
7
Why a Service Bus? Example: Location Transparency
7
• Isolate from changes to service location
Host One
New Hire Process
Initialize Benefits Service
Initialize Benefits Service
Host Two
Service Bus
Route to Host Two
AfterMove
Before
![Page 8: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/8.jpg)
8
Why a Service Bus? Example: Backwards Compatibility
8
• Isolate from changes to service contract/interface
Service BusProcessOrder
Service
Customer Portal Transform
Message
<2.0>
<1.0>
CSR App<2.0>
<2.0>
<1.0>
![Page 9: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/9.jpg)
9
Why a Service Bus? Example: Service Enablement
9
• Allow multiple protocols/messages to participate in a SOA
Service Bus
Transform Payroll ServiceJMSExpense
Reimbursement Process
SOAP
Submit Expense Report Service
FTP
Transform Check Order Status Service
SOAPInventory Management App JMS
![Page 10: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/10.jpg)
10
Enabling Agility…With an Enterprise-Class Service Bus
10
• 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
• Manage risk
Oracle Service Bus
ServiceService ServiceService
ServiceService ServiceService
![Page 11: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/11.jpg)
11
Oracle Service BusKey Differentiators
11
• 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
![Page 12: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/12.jpg)
12
OSB 11g new features –
Service result caching
![Page 13: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/13.jpg)
13
Service Result Caching - Overview
• 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
Process Flow /
Orchestration
Legacy
Service
Consumer
Service
Provider Ora
cle
Serv
ice B
us
![Page 14: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/14.jpg)
14
Service Result Caching - Overview
14
Process Flow /
Orchestration
Legacy
Service
Consumer
Service
Provider
P
BBackup Node
PrimaryNodeGet / Put (Cachekey)
Service Data
Coherence Data Grid
OSB
Result
Cache
Ora
cle
Serv
ice B
us
Check cache
If results not in cache, invoke service & cache results
Side Cache Pattern
![Page 15: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/15.jpg)
15
Service Result Caching – Feature Highlights
15
• 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
![Page 16: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/16.jpg)
16
Service Result Caching – Feature HighlightsKey Concepts
16
• 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
![Page 17: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/17.jpg)
17
Service Result Caching – Feature HighlightsKey Concepts
17
• 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
• $outbound/ctx:request/ctx:cache-ttl
– Default is 5 minutes
<0 0 >0
Not
cached
No expiry Expiry
time
![Page 18: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/18.jpg)
18
Service Result Caching – Feature HighlightsBusiness Service - Configuration Details
18
How to calculate the Cache Token
How long the cached result will be kept for
![Page 19: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/19.jpg)
19
Service Result Caching – Feature HighlightsGlobal Settings
19
![Page 20: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/20.jpg)
20
Service Result Caching – Feature HighlightsBusiness Service - Operational Settings
20
![Page 21: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/21.jpg)
21
Service Result Caching – Feature HighlightsDashboard - Service Health
21
How often the cache is hit compared to the total number of calls
How often the cache is hit
How often the external
service is invoked
![Page 22: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/22.jpg)
22
Result caching demo
![Page 23: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/23.jpg)
23
Result Caching Demo
23
RequisitionRequestor
(Proxy Service)
RequisitionRequestor
(Business Service)
Legacy
Routes to RequisitionRequestor (Business Service)
• Message has a requisition id
Caching is configured as follows:
• Cache Token is the requisition id
• Expiration Time is 1 minute
Represented in the demo by
the RequisitionProvider (ProxyService) which
• Waits 5 seconds (to simulate a slow legacy system)
• Returns a requisition for the given requisition id
![Page 24: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/24.jpg)
24
OSB 11g new features –
JCA Transport Enhancement
![Page 25: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/25.jpg)
25
JCA Transport Enhancement - Feature Highlights
25
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
![Page 26: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/26.jpg)
26
JCA Transport Enhancement - Feature Highlights
26
• 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
![Page 27: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/27.jpg)
27
JCA Transport Enhancement - Feature Highlights
27
• 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
![Page 28: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/28.jpg)
28
JCA Transport Enhancement - Feature Highlights
28
• 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
![Page 29: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/29.jpg)
29
JCA Transport Enhancement - Feature Highlights
29
• OSB JCA Resource Dependency Hierarchy
JCA Service
Concrete WSDL
Abstract WSDL
JCA Resource
TopLink Mapping Resource
XSD/Schema
![Page 30: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/30.jpg)
30
JCA Transport Enhancement - Feature Highlights
30
• 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
![Page 31: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/31.jpg)
31
JCA Transport Enhancement - Feature Highlights
31
• 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.
![Page 32: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/32.jpg)
32
JCA Transport Demo
![Page 33: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/33.jpg)
33
OSB 11g new features –
Custom XPath functions
![Page 34: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/34.jpg)
34
Custom XPath functions - overview
34
• 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.
OSB XQuery
Expression / resource
Oracle
XQuery 1.0 engine
XQ Standard functions
fn:concat
fn:abs
…
OSB built-in extensions
fn-bea:uuid
fn-bea:isUserInRole
…
Custom functions
ns0:myfunc
![Page 35: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/35.jpg)
35
Custom XPath functions - Feature HighlightsTypical development process
35
– 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
![Page 36: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/36.jpg)
36
Custom XPath functions - Feature Highlights
36
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
.properties
osb-built-in.xml
.properties
My-func.xml
%ALSB_HOME%\config\xpath-functions
directory
JAR File JAR File
OSB Runtime XQuery Engine
Added to OSB
classpath
register new functions …
![Page 37: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/37.jpg)
37
Custom XPath functions - Feature HighlightsContents of configuration XML file
37
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)
![Page 38: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/38.jpg)
38
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>
![Page 39: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/39.jpg)
39
Custom XPath functions - Feature HighlightsRules for writing Java code
39
– 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.
![Page 40: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/40.jpg)
40
Custom XPath functions demo
http://blogs.oracle.com/imc/entry/calling_custom_java_code_from
![Page 41: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/41.jpg)
41
OSB 11g new features –
Transactional Message Flows
![Page 42: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/42.jpg)
42
Message Flow Transaction - Overview
42
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
Application
Client
Service
Clients
Oracle Service Bus Enterprise
Services
ServiceProxy BusinessHTTP/SOAP
JMS
FTP
HTTP
JMS
![Page 43: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/43.jpg)
43
Message Flow Transaction – Feature Highlights
43
• 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
![Page 44: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/44.jpg)
44
Message Flow Transaction – Feature HighlightsNew options in proxy service configuration
44
If checked, OSB will ensure there is a transaction context in message flow by starting a
transaction if necessary
![Page 45: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/45.jpg)
45
Message Flow Transaction – Feature Highlights“Transaction Required” setting
45
• 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
Inb
ou
nd
en
dp
oin
t
Ou
tbo
un
d
en
dp
oin
t
Message Flow
request path
actions
Message Flow
response path
actions
TX begin
TX commit
![Page 46: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/46.jpg)
46
Message Flow Transaction – Feature Highlights
46
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
Inb
ou
nd
en
dp
oin
t
Ou
tbo
un
d
en
dp
oin
t
Message Flow
request path
actions
Message Flow
response path
actions
TX begin
TX commit
![Page 47: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/47.jpg)
47
Message Flow Transaction – Feature Highlights
47
• 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,…)
![Page 48: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/48.jpg)
48
Message Flow Transaction – Feature HighlightsError handling
48
– 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 abort
![Page 49: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/49.jpg)
49
Message flow transactions demo
http://blogs.oracle.com/imc/entry/how_to_control_the_transaction
![Page 50: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/50.jpg)
50
OSB 11g new features –
Native java support
![Page 51: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/51.jpg)
5151
Application
Client
Service
ClientsEnterprise
Services
EJBs
• 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
Proxy
Native Java Support - OverviewInbound and Outbound
Web
Services
JMS
EJB
Oracle Service Bus
Java CalloutBusiness
Services
Proxy Services
HTTP
SOAP
EJB EJB
JMSJMS
![Page 52: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/52.jpg)
52
Native Java Support – OverviewJEJB transport
52
• 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.
![Page 53: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/53.jpg)
53
Native Java Support – OverviewJMS transport enhancements
53
• 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
![Page 54: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/54.jpg)
54
Native Java Support – Feature HighlightsJava object in the pipeline
54
• OSB enhanced to support Java Objects
• In the Pipeline, Java Object is represented as <ctx:java-content ref=”key1”
xmlns:ctx="http://www.bea.com/wli/sb/context”/>
Application
Client
POJOs
Request
Pipeline
Request
Pipeline$body
<ctx:java-content ref=“key1”/>
Register to Object
Repository
Key1={obj}
Transport Layer
![Page 55: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/55.jpg)
55
Native Java Support – Feature HighlightsMessage format
55
• 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 Callout
![Page 56: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/56.jpg)
56
Native Java Support – Feature HighlightsJEJB Inbound
56
• 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
Stateless Session Bean
Request Pipeline
Method1(Pojo1,…)
Method2(Pojo2,…)
Response Pipeline
Clie
nt A
pplic
ation
Method1
Invocation Point = “Method1”
Args= {Pojo1, …}
Result
![Page 57: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/57.jpg)
57
Native Java Support – Feature HighlightsJEJB Inbound
57
• The URI for the EJB Proxy Service is a part the global JNDI name for locating the EJB within the remote JNDI context
![Page 58: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/58.jpg)
58
Native Java Support – Feature HighlightsJEJB Inbound
58
• 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
![Page 59: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/59.jpg)
59
Native Java Support – Feature HighlightsJEJB Outbound
59
• 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
Oracle Service Bus
Request Pipeline
Response Pipeline
JE
JB
Busin
ess S
erv
ice Enterprise
Services
EJBResult
Invocation Point = “Method1”
Args= {Pojo1, …}
![Page 60: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/60.jpg)
60
Native Java Support – Feature HighlightsJEJB Outbound
60
Business Service URI points to the JNDI Provider and JNDI name of the Remote EJB
![Page 61: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/61.jpg)
61
Native Java Support – Feature HighlightsJEJB Outbound
61
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
![Page 62: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/62.jpg)
62
Native Java Support – Feature HighlightsJMS Transport
62
• JMS Services configured with Messaging type „Java‟ can
receive/send JMS Objects messages
• Java Object Support for both JMS inbound and outbound
JMS
Business
Oracle Service Bus
JM
S P
rox
y
JMS
Queue
JMS
Queue
$body
Object
Message
Object
MessageRequest
Pipeline
JM
S B
usin
ess
Se
rvic
e
Register the Object with Object Repository
Retrieve the Object from Object Repository<ctx:java-content ref=”jcid" />
![Page 63: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/63.jpg)
63
Native Java Support – Feature HighlightsJMS Transport
63
• Service Type
– A new Messaging
Service sub-type
“Java” for
configuring Java
Object support in
JMS
![Page 64: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/64.jpg)
64
Native Java Support – Feature HighlightsJMS Transport
64
• 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>
![Page 65: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/65.jpg)
65
JEJB transport demo http://blogs.oracle.com/imc/entry/how_to_mediate_ejb_invocation
![Page 66: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/66.jpg)
66
Additional information & resources
![Page 67: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/67.jpg)
67
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 [email protected]
![Page 68: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/68.jpg)
68
Dmitry Nefedkin
ISV Migration Center FMW Technical Consultant
Visit our team blog: http://blogs.oracle.com/imc
Q&A
![Page 69: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/69.jpg)
69
![Page 70: Oracle Service Bus 11g: new features for developers](https://reader033.fdocuments.net/reader033/viewer/2022061611/555a76f6d8b42a98568b47a6/html5/thumbnails/70.jpg)
70