Sunteți pe pagina 1din 6

Oracle SOA Suite

Best Practices
AN INTEGRATION/SOA WHITE PAPER APRIL 2012
SUBSCRIBE TO PERFICIENT BLOGS ONLINE
www.Perfcient.com/SocialMedia
BECOME A FAN OF PERFICIENT ON FACEBOOK
www.Facebook.com/Perfcient
FOLLOW PERFICIENT ON TWITTER
www.Twitter.com/Perfcient
DOWNLOAD PERFICIENT WHITE PAPERS
www.Perfcient.com/WhitePapers
Adobe
PDF
Adobe
PDF
Adobe
PDF
Adobe
PDF
Copyright 2007-2012 Perfcient, Inc. All rights reserved. This material is or contains Proprietary Information, Confdential Information and/or Trade Secrets of Perfcient, Inc. Disclosure to
third parties and or any person not authorized by Perfcient, Inc. is prohibited. Use may be subject to applicable non-disclosure agreements. Any distribution or use of this material in whole
or in part without the prior written approval of Perfcient, Inc. is prohibited and will be subject to legal action.
2 Oracle SOA Suite Best Practices
Oracle SOA SuiteBest Practices
The Mediator is an intra-composite mediation component
that is deployed within an application. It is responsible
for brokering communications between components that
make up a composite, enabling transformation, routing,
event delivery and payload validation inside the composite.
The Oracle Service Bus provides standalone service bus
capabilities, enabling separation of concerns between
application developers and target systems or services.
While Oracle Service Bus provides enterprise service re-use and
management, the Mediator component provides certain localized
mediation capabilities with the Business Service Layer. Thus,
the lifecycle of a Mediator component is tightly coupled with that of
the SOA composite application that provides the application logic.
Mediator provides the following capabilities within the context of a
single composite application:
Connectivity abstraction from a business process
Inline data transformation / mapping
Message fltering
Oracle Service Bus enables efective de-coupling of systems and
lifecycles within enterprise architecture. Mediator provides any
abstraction that the Business Process needs within the context of a
single composite. The key considerations for using Mediator include:
The functionality is available within the context of a single
SOA composite application. e.g., Mediator can be used to
expose a BPEL process to multiple services defned on the
same composite.
Mediator does not focus on key capabilities required for the
SOA Infrastructure category such as trafc shaping and end-
point management.
Mediator should not be used to share services at an
enterprise-wide level.
Abstract
This paper is intended to provide guidance around best practices for
Oracle Fusion SOA Suite Middleware development and is intended
for enterprise architects, middleware design architects and SOA
developers. The scope of Oracle Fusion design best practices is vast
and its not possible to discuss all design aspects of Oracle Fusion
middleware in a paper of this scope. However, eforts have been
made to cover those aspects which are immediately relevant for
making design decisions with Oracle Fusion SOA Suite Middleware.
The Oracle SOA Suite is a key component of the Oracle Fusion
Middleware product stack. With the 11g version Oracle introduced
many of key improvements into the Oracle SOA Suite stack such as:
11g SOA Suite runs on leading WebLogic Application Server
Industry SOA standard Service Component Architecture
(SCA) based SOA Suite
Unifed Development and management interface
Coherence-based in-memory caching solutions
Introduction of Oracle Service Bus (OSB)
The Oracle SOA Suite is rich in products with powerful capabilities.
This can sometimes lead to a very complex design and confusion
regarding which product to choose to implement a particular design.
In absence of best practices and guidance from experts it will be
difcult to realize the full potential of SOA Suite. This document
will help you to jump start with some of the important SOA suite
implementation decisions. However, a detailed current state analysis,
a good enterprise architecture vision and SOA maturity analysis is
required to lay the foundation for SOA Suite implementation.
Oracle Service Bus (OSB) vs. SOA
Composite-Based Mediator
There is always a dilemma whether to use OSB or Mediator for
service mediation. The term mediator is very confusing and often
makes one think its used for service meditation. Oracles guidance
in this matter comes in the form of a Statement of Direction when
they released the new version of Fusion in the form of 11g:
Author
Kulin Desai is a Technical Architect with Perfcient. He has 14 years of consulting experience helping clients with setting
up integration & SOA Centers of Excellence, SOA architecture assessments, SOA technical architecture design and
implementation, and delivery of a wide range of solutions in the area of Oracle Fusion Middleware, TIBCO J2EE, WebSphere
MQ and IBM mainframe-based legacy integration solutions. During his career Kulin has led several SOA and integration
engagements ranging from one-person teams to large teams with work spanning across multiple years, helping the client to
realize their SOA vision.
Oracle SOA Suite Best Practices 3
Creating a Service in Java vs. SOA Suite
Oracle 11g SOA Suite recognizes that there are existing assets in
the IT landscape and does not force these to be replaced, preferring
instead to encapsulate and later extend these resources. Its often
easy to lean towards creating a new service in SOA Suite using
a JDeveloper drag-and-drop feature and easy confguration. But
the primary goal of the SOA Suite should be to create composite
services or to extend existing services. The Service Component
Architecture is a standard that should be used as a guiding
principle to defne composite services within SOA Suite. Keeping
pure services in Java or other similar platforms helps to reduce the
migration impact in the event of moving from Oracle-based SOA
Suite to other SOA Suites.
Other Considerations for Selection
Characteristic Mediator OSB Remarks
Routing + ++ Better routing capability with OSB in the form of Split join
Transformation: XSLT
++ +
OSB provides runtime support for XSLT whereas Mediator provides
both design time and runtime support for XSLT
Transformation: XQuery
+
OSB provides runtime support for XQuery whereas Mediator does
not provide support for XQuery
Technology Adapters Design
Time ++ + Composite provides easy JDeveloper-based adapter confguration
Message Validation ++ + Composite provides richer Shematron-based message validation
Error Handling + ++ OSB: Much richer error handling
Re-submittance of Failed
messages + OSB: Is stateless
Instance Monitoring ++ + OSB: Stateless: No concept of an instance
Performance Tuning + ++ OSB: Throttling
Performance
+ ++
The Oracle Service Bus is designed to provide better performance
as compared to Mediator when it comes to handling message load,
Routing and Transformation.
Oracle Service Bus provides the ability to set service level agree-
ments (SLAs) on business and proxy services. These SLAs defne
the precise level and quality of service expected from business and
proxy services.
Sequencing or Message
Order Support +
Oracle Mediator can re-sequence the incoming messages in a user-
specifed order.
Support for Attachments
+ ++
In the current release of the Oracle Mediator when you call a SOAP
Web Service with attachments you will not be able to perform a
payload manipulation using the Assign or Transform functions. It fails
with an exception because SOAP with attachments is not supported
in Oracle Mediator if you use the Assign or Transform functions.
So when calling a SOAP Web Service with attachments use Oracle
Service Bus instead of Oracle mediator.
JCA Support
++ +
OSB 11.1.1.5 version has known issues with some of the JCA-based
adapters
10g to 11g ESB Migration
++ +
Legacy 10g Oracle ESB fows are automatically migrated to 11g
Mediator based composites using Jdeveloper. However, Legacy 10g
ESB to OSB migration is manual.
Transaction Support
++ ++
SOA composite supports compensating transactions. OSB supports
propagating transactions.
+ Feature Available ++ Advanced Feature/Better Support Available
4 Oracle SOA Suite Best Practices
Oracle SOA SuiteBest Practices
such as the location and network used to invoke the service.
Keep in mind that IT security is designed and implemented by
diferent people with diferent skills and expertise than those
actually responsible for implementing processes and services.
2. Layered Security IT Security should be layered involving
measures on multiple levels such as awareness, logical
access control, network security, and so on.
3. Classify Your Services Using a security classifcation
results in just the right amount of security to be applied while
saving money. A best practice is to defne a limited set of
security classifcation and corresponding measures.
Top-Down vs. Bottom-Up Design
Oracle SOA Suite SCA-based design can help to facilitate both
top-down and bottom-up application design and development. An
architect can, for example, build out the high-level fow of the SCA
application and relate part of the implementation to developers
Securing Services Using Oracle Web
Services Manager (OWSM)
Using SOA Suite and Oracle Service Bus in conjunction with
Oracle Web Services Manager (OWSM) provides a scalable,
standards-based, centrally managed approach to securing your
SOA environment with WS-Security policies while leveraging your
existing security providers. Oracle Web Services Manager provides
a runtime framework for security policy creation, management, and
governance. You create policies, attach them to services in Oracle
Service Bus, and enforce those policies at various points in the
messaging life cycle with Oracle Web Service Manager agents.
Best Practices When Implementing Security
Using OWSM
1.`Externalize Security It is a good design practice to
externalize security from service and process implementation.
There may be diferent security requirements for the same
service based on type of service consumer and related aspects
Role SOA Suite 10g SOA Suite 11g
Java EE Container OC4J WebLogic
Management Consoles BPEL Console, OESB Console, OWSM
Console, Enterprise Manager (OC4J), BAM
Management
Enterprise Manager Fusion Middleware
Control, WebLogic Console, BAM Console
Orchestration Oracle BPEL Process Manager BPEL Process Service Component
Human Interaction Human Workfow Engine Human Workfow Service Component
Externalize Logic Oracle Business Rules Business Rules Service Component
Transformation, Routing, Fan-out, etc. Oracle ESB Inside an application/composite: Oracle
Mediator Service Component. Enterprise
wide: Oracle Service Bus
Apps and Systems Connectivity JCA Adapters JCA Adapters
Business Dashboards Oracle BAM (.NET-based) Oracle BAM (JEE-based)
Security OWSM (proxy and gateway modes) OWSM (proxy), OEG (gateway)
Sharing of Common Artifacts Slide Oracle MDS, Oracle OER
Cross Referencing DVM DVM
Clustering & Load Balancing jGroups WebLogic supports unicast and multicast
for clustering along with Coherence support
for web sessions
Deployment Property Replacements Tokens and Property fle Confg Plans and Customization plans
IDE JDeveloper JDeveloper, OSB Console, Eclipse (with
OEPE)
Fault Handling Error Hospital Policy-based fault handling framework
10G to 11G SOA Suite Product and Feature Mapping
Oracle SOA Suite Best Practices 5
Error & Exception Handling
One of the new features of 11g SOA Suite is that it provides a
framework for error handling within BPEL processes, Adapter
and Mediator components. The fault management framework
allows us to defne policies for handling faults in a loosely coupled
manner. It externalizes the fault-handling mechanism from process
implementation. A policy consists of two basic components,
namely, the faults that you wish to catch and the actions you wish
to take once the faults are caught. Once a policy is defned, one
can then attach (or bind) it to a SOA composite, a BPEL, a Mediator
service component, or an external reference. This provides a
fexible mechanism for attaching diferent policies to diferent
components within a composite. Although BPEL processes and
Mediator leverage the same fault management framework, the
application of the framework is slightly diferent for each.
Logging
Attaching the Log Policy
One of the standard WSM policies is a logging policy. By applying
this policy, one can extend the logging with exact entries with
the contents of the messages coming in to and fowing out of the
composites and components.
Setting the Name of a Composite Instance
Composite instances all look the same in the console. The only way
really to distinguish one from the other is based on the timestamp,
which can be very cumbersome, especially when you have no
idea of the time of the message. There are several ways to make
it easier to discern between instances. One way is by dynamically
assigning a meaningful name to an instance of a composite.
Composite Sensors
Composite sensors make tracing easy by allowing you to expose
information from within composite instances. These sensors are
typically used to expose the data enable search of the instances.
Legacy 10g to 11G Migration Best
Practices and Steps
Plan upgrade and defne rollout strategy and timeframe
Design reference architecture to accommodate new and
upgraded features
Defne deployment topology
Install 11g products
Identify initial POC projects to migrate
Migrate SOA application, BAM components and WSM
policies using a combination of automated and
manual steps
Create new deployment ANT and WLST-based scripts
Confgure JMS adapter, DB adapters, data sources,
JNDI, and connections pools using WebLogic consoles
who have particular strengths in particular areas. The bottom-up
approach allows SCA to be the glue that binds together lower-level
components into a higher level of abstraction within a number of
applications.
Composition vs. Orchestration
Oracle SOA Suite SCA-based architecture is all about composition
of components together into an integrated circuit that might well
be part of a bigger application. Orchestration concerns the control
of a process across multiple systems and people. That control
involves branching, state management and human task fows. One
should use SOA composite for composition and BPEL for process
orchestration.
Business Rules as a Service
With OFM SOA 11g Oracle is moving towards a standardized
approach for creating distributed SOA applications. There are
various approaches available to call business rules from distributed
SOA applications (Java + Composite). But at the same time, Oracle
wants enterprises to standardize the way they invoke business
rules. Here are few recommended approaches:
Using SOA
OFM allows rules as services using decision services
Create a proxy rules service
Pros: Provides even non-Java-based applications to use business
rules in a standardized way and while also achieving loose coupling.
This also increases rule reusability.
Using Standardized API
Use Java JSR-94 rules API to connect to repo repository
Pros: This provides a standardized Java way to connect distributed
rules engine, where you can port from one rule engine to another.
Cons: Unknown performance benchmarks and unknown total
compatibility with Oracle rules features.
Sharing and Reusing Common
Artifacts with MDS and OER
All shared SOA artifacts (such as XSD, XSLT, WSDL) should be
stored in a central repository that can be accessed at design
time and at runtime from deployed SOA composite applications.
This central store is known as Oracle Meta Data Storage (MDS)
repository. This MDS repository, along with the metadata services
on top of it, helps the organization to reuse SOA application
artifacts such as canonical data model defnitions. However the
MDS repository is an intrinsic part of the SOA suite and should
not be viewed as enterprise-wide repository. The Oracle enterprise
repository provides enterprise-wide central repository of metadata.
6 Oracle SOA Suite Best Practices
Oracle SOA SuiteBest Practices
Additional Resources
Here are additional resources that you may fnd useful to read in conjunction with this white paper:
OSB Statement of Direction
http://www.oracle.com/technetwork/articles/oracle-service-bus-sod-128083.pdf
Maximize the Benefts of Oracle SOA Suite 11g with Oracle Service Bus (Oracle white paper)
http://www.oracle.com/us/technologies/soa/maximizing-benefts-oracle-soa-150680.pdf
Oracle SOA Suite 11g R1 Developers Guide by Matt Wright and Antony Reynolds
Service Component Architecture - Assembly Model
http://www.oasis-opencsa.org/sca
Oracle SCA Power of Composite
http://www.oracle.com/technetwork/topics/entarch/whatsnew/oracle-sca-the-power-of-the-composi-134500.pdf
Oracle Enterprise Deployment Guide for SOA Suite
http://download.oracle.com/docs/cd/E15523_01/core.1111/e12036.pdf
Oracle Fusion Performance Tuning Guide
http://download.oracle.com/docs/cd/E15523_01/core.1111/e10108.pdf
Create JMS modules, queues, topics, MDS repository,
notifcations, fault handlers and fault handling policies
Defne fault handling framework
Recompile and deploy SOA application and BAM
components
Unit testing, regression testing and E2E testing
Measure and compare performance and
performance tuning
Roll out initial POC projects to production
Review process, refne migration steps and create
migration checklist
Implement the migration plan

S-ar putea să vă placă și