Introduction to Oracle Service Bus & Oracle Service Registry

Exclusive offer: get 50% off this eBook here
WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g

WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g — Save 50%

Define, model, implement, and monitor real-world BPEL business processes with SOA powered BPM for Oracle SOA Suite with this book and eBook

$41.99    $21.00
by Marcel Krizevnik Matjaz B. Juric | September 2010 | BPEL Enterprise Articles SOA Oracle

In this article, by Matjaz B. Juric & Marcel Krizevnik, authors of WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g, we will get familiar with Oracle Service Bus (OSB), the Oracle strategic ESB. First, we will look at the OSB architecture and features. Then we will demonstrate the use of OSB on our Travel business process. We will show the combined use of OSB and Oracle Service Registry (OSR) to provide very high fexibility. Therefore, we will frst publish the EmployeeTravelStatus service to the OSR. Then, we will open the Oracle Service Bus Console, create a new project, and import the service and all related artifacts from OSR. Next, we will create a proxy service for the EmployeeTravelStatus service. We will show how to defne the proxy service message fow. We will also demonstrate some advanced features of OSB, such as service result caching. Then, we will deploy the new version of EmployeeTravelStatus service with a slightly different interface and show how OSB can absorb these changes by simply adding an XSL transformation. Finally, we will publish the new proxy service to OSR and modify the corresponding reference binding component in our SOA composite, so that it will retrieve the proxy endpoint address from OSR in runtime.

In this article, we will discuss the following:

  • Oracle Service Bus architecture and features
  • Publishing services to OSR

(For more resources on BPEL, SOA and Oracle see here.)

If we want our SOA architecture to be highly fexible and agile, we have to ensure loose coupling between different components. As service interfaces and endpoint addresses change over time, we have to remove all point-to-point connections between service providers and service consumers by introducing an intermediate layer—Enterprise Service Bus (ESB). ESB is a key component of every mature SOA architecture and provides several important functionalities, such as message routing, transformation between message types and protocols, the use of adapters, and so on. Another important requirement for providing fexibility is service-reuse. This can be achieved through the use of UDDI (Universal Description, Discovery and Integration) compliant service registry, which enables us to publish and discover services. Using service registry we can also implement dynamic endpoint lookup, so that service consumers retrieve actual service endpoint address from registry in runtime.

Oracle Service Bus architecture and features

ESB provides means to manage connections, control the communication between services, supervise the services and their SLAs (Service Level Agreements), and much more. The importance of the ESB often becomes visible after the frst development iteration of SOA composite application has taken place. For example, when a service requires a change in its interface or payload, the ESB can provide the transformation capabilities to mask the differences to existing service consumers. ESB can also mask the location of services, making it easy to migrate services to different servers. There are plenty other scenarios, where ESB is important.

In this article, we will look at the Oracle Service Bus (OSB). OSB presents a communication backbone for transport and routing of messages across an enterprise. It is designed for high-throughput and reliable message delivery to a variety of service providers and consumers. It supports XML as a native data type, however, other data types are also supported. As an intermediary, it processes incoming service request messages, executes the routing logic and transforms these messages if needed. It can also transform between different transport protocols (HTTP, JMS, File, FTP, and so on.). Service response messages follow the inverse path. The message processing is specifed in the message fow defnition of a proxy service.

OSB provides some functionalities that are similar to the functionalities of the Mediator component within the SOA Composite, such as routing, validation, fltering, and transformation. The major difference is that the Mediator is a mediation component that is meant to work within the SOA Composite and is deployed within a SOA composition application. The OSB on the other hand is a standalone service bus. In addition to providing the communication backbone for all SOA (and non-SOA) applications, OSB mission is to shield application developers from changes in the service endpoints and to prevent those systems from being overloaded with requests from upstream applications.

In addition to the Oracle Service Bus, we can also use the Mediator service component, which also provides mediation capabilities, but only within SOA composite applications. On the other hand, OSB is used for inter-application communication.

The following figure shows the functional architecture of Oracle Service Bus (OSB). We can see that OSB can be categorized into four functional layers:

  • Messaging layer: Provides support to reliably connect any service by leveraging standards, such as HTTP/SOAP, WS-I, WS-Security, WS-Policy, WS-Addressing, SOAP v1.1, SOAP v1.2, EJB, RMI, and so on. It even supports the creation of custom transports using the Custom Transport Software Development Kit (SDK).
  • Security layer: Provides security at all levels: Transport Security (SSL), Message Security (WS-Policy, WS-Security, and so on), Console Security (SSO and role based access) and Policy (leverages WS-Security and WS-Policy).
  • Composition layer: Provides confguration-driven composition environment. We can use either the Eclipse plug-in environment or web-based Oracle Service Bus Console. We can model message fows that contain content-based routing, message validation, and exception handling. We can also use message transformations (XSLT, XQuery), service callouts (POJO, Web Services), and a test browser. Automatic synchronization with UDDI registries is also supported.
  • Management layer: Provides a unifed dashboard for service monitoring and management. We can defne and monitor Service Level Agreements (SLAs), alerts on operation metrics and message pipelines, and view reports.

Proxy services and business services

OSB uses a specifc terminology of proxy and business services. The objective of OSB is to route message between business services and service consumers through proxy services.

Proxy services are generic intermediary web services that implement the mediation logic and are hosted locally on OSB. Proxy services route messages to business services and are exposed to service consumers. A proxy service is confgured by specifying its interface, type of transport, and its associated message processing logic. Message fow defnitions are used to defne the proxy service message handling capabilities.

Business services describe the enterprise services that exchange messages with business processes and which we want to virtualize using the OSB. The defnition of a business service is similar to that of a proxy service, however, the business services does not have a message fow defnition.

Message fow modeling

Message fows are used to defne message processing logic of proxy services. Message fow modeling includes defning a sequence of activities, where activities are individual actions, such as transformations, reporting, publishing and exception management. Message fow modeling can be performed using a visual development environment (Eclipse or Oracle Service Bus Console). Message fow defnitions are defned using components, such as pipelines, branch nodes and route nodes, as shown in the following fgure:

A pipeline is a sequence of stages, representing a one-way processing path. It is used to specify message fow for service requests and responses. If a service defnes more operations, a pipeline might optionally branch into operational pipelines. There are three types of pipelines:

  • Request pipelines are used to specify the request path of the message flow
  • Response pipelines are used to specify the response path of a message flow
  • Error pipelines are used as error handlers.

Request and response pipelines are paired together as pipeline pairs. Branch nodes are used as exclusive switches, where the processing can follow one of the branches. A variable in the message context is used as a lookup variable to determine which branch to follow.

Route nodes are used to communicate with another service (in most cases a business service). They cannot have any descendants in the message fow. When the route node sends the request message, the request processing is fnished. On the other side, when it receives a response message, the response processing begins.

Each pipeline is a sequence of stages that contain user-defned message processing actions. We can choose between a variety of supported actions, such as Publish, Service Callout, For Each, If... Then..., Raise Error, Reply, Resume, Skip, Delete, Insert, Replace, Validate, Alert, Log, Report, and more. Later in this article, we will show you how to use a pipeline on the Travel Approval process. However, let us frst look at the Oracle Service Registry, which we will use together with the OSB.

WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g Define, model, implement, and monitor real-world BPEL business processes with SOA powered BPM for Oracle SOA Suite with this book and eBook
Published: September 2010
eBook Price: $41.99
Book Price: $69.99
See more
Select your format and quantity:

Read more about this book

(For more resources on BPEL, SOA and Oracle see here.)

Oracle Service Registry

Oracle Service Registry (OSR) is a fully V3-compliant implementation of UDDI (Universal Description, Discovery and Integration), and one of the key components of Oracle SOA Suite 11g. It allows us to publish and discover services and service providers, and manage metadata about services (security, transport, or quality service) using taxonomies. Therefore, it plays an important role when trying to improve visibility and promote service reuse. It is also important in the scope of SOA governance.

Service registry is very important for various reasons. It provides a central place where all service defnitions are stored. This becomes important when the number of services (including BPEL processes) grows. It helps to maintain overview of services. Service registry also provides a central place where developers can search for existing services. This improves service reuse, which is one of the most important aspects of SOA. Of course, service registry also provides means to publish services for other developers to discover and reuse.

In addition to reuse, service registry can also be helpful when we need to migrate services from one server to the other. This can happen because of various reasons, but one of the most common reasons is the migration between the development, test, and production environments. Service registry is also helpful when we need to version services and manage changes. With service registry we can also develop more loosely-coupled composite applications, because we do not need to hard-code the service URLs. Rather, the application will resolve URLs at run-time. In all cases, service registry is often used together with the ESB. We will not discuss all OSR details in this article. We will demonstrate how to publish a service, how to export/import resources between OSB and OSR, how to browse the OSR using JDeveloper, and how to enable dynamic endpoint lookup in a SOA composite application.

Logging into Oracle Service Registry

To log into Oracle Registry Control, we have to open web browser and access the following URL: http://host_name:port/application_name/uddi/web, where host_name is the name of the host on which OSR is installed, application_name is name of the application (default name is registry), and port is a number that is set during installation process.

OSR provides two web consoles: Registry Control and Business Service Control. Registry Control provides an interface that is based on the UDDI specifcation and is useful for developers familiar with business entities and tModels. Business Service Control on the other hand provides a simpler interface for less-technical users unfamiliar with tModels and other UDDI stuff. We can publish and discover services using both. In this article, we will show how to use Registry Control Console. We click on the Login link in the upper-right corner. The Registry Control home page opens, as shown in the following screenshot:

Publishing a business entity

Before publishing the EmployeeTravelStatus service, we have to publish a business entity (service provider). This is because the UDDI data model requires a business entity for each service, which is represented by a tModel. We click on the Publish link and then press the Add business button. We name the business entity Packt Publishing. We can also add a description and enter custom business key.

We click on the Add business button and then Save changes.

Publishing a business service

Back on the Publish page, we expand the Businesses folder, right-click the Packt Publishing business entity, and select Publish WSDL.

The Publish WSDL document page opens. We enter the WSDL location (URI) of the EmployeeTravelStatus service and click Publish.

The Publish summary page opens. We can review the entities that have been published to the OSR. We click OK.

Summary

In the above article we have covered:

  • Oracle Service Bus architecture and features
  • Publishing services to OSR

Further resources on this subject:


WS-BPEL 2.0 for SOA Composite Applications with Oracle SOA Suite 11g Define, model, implement, and monitor real-world BPEL business processes with SOA powered BPM for Oracle SOA Suite with this book and eBook
Published: September 2010
eBook Price: $41.99
Book Price: $69.99
See more
Select your format and quantity:

About the Author :


Marcel Krizevnik

Marcel Krizevnik is a researcher at the University of Maribor where he is preparing a Ph.D. in computer and information science. Marcel started his career as a software developer of chemistry information systems. Now, his main research areas are service-oriented architecture and cloud computing. He is also a member of SOA Competency Center and Cloud Computing Center. In the last three years, he has been involved in several SOA technology projects.

Matjaz B. Juric

Matjaz B. Juric holds a PhD in Computer and Information Science. He is a Full Professor at the University of Ljubljana and head of the Cloud Computing and SOA Competence Centre (http://www.soa.si). Matjaz is a Java Champion, IBM Champion, and Oracle ACE Director. He has more than 15 years of work experience. He has authored/co-authored "Do More with SOA Integration, WS-BPEL 2.0 for SOA Composite Applications, Oracle Fusion Middleware Patterns, Business Process Driven SOA using BPMN and BPEL, and Business Process Execution Language for Web Services "(English and French editions). He has also authored/co-authored "BPEL Cookbook: Best Practices for SOA-based integration and composite applications development" (award for best SOA book in 2007 by SOA World Journal), "SOA Approach to Integration, Professional J2EE EAI, Professional EJB, J2EE Design Patterns Applied", and .NET Serialization Handbook. He has published chapters in More Java Gems (Cambridge University Press) and in Technology Supporting Business Solutions (Nova Science Publishers). He has also published in several journals and magazines and presented at conferences. Matjaz has been involved in several large-scale projects. In cooperation with the IBM Java Technology Centre, he worked on performance analysis and optimization of RMI-IIOP, an integral part of the Java platform.

Books From Packt


Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial
Getting Started With Oracle SOA Suite 11g R1 – A Hands-On Tutorial

BPEL PM and OSB operational management with Oracle Enterprise Manager 10g Grid Control
BPEL PM and OSB operational management with Oracle Enterprise Manager 10g Grid Control

Service Oriented Architecture: An Integration Blueprint
Service Oriented Architecture: An Integration Blueprint

Oracle Coherence 3.5
Oracle Coherence 3.5

Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial
Getting Started with Oracle BPM Suite 11gR1 – A Hands-On Tutorial

Oracle Siebel CRM 8 Installation and Management
Oracle Siebel CRM 8 Installation and Management

Oracle Fusion Middleware Patterns
Oracle Fusion Middleware Patterns

EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g
EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g


Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software