Saturday, 30 November 2013

Exception or Error Handling in Oracle Service Bus (OSB)

In OSB we can handle Error in different level as follows

Here am going to explain the possible ways  exception or error handling in osb ,For better understand  comparing OSB error handling with java 

1 ) Stage
2 ) Pipe Line  (Request/Response)
3 ) Service
4 ) System (System Internal )

If there is no error handler is configured at the level where error has occurred then the error will be propagated to next level (if error handler is there in this level the handler will be executed) error propagation as below.

Stage Node --> Pipeline Pair-> Service->System

We can compare the OSB error handling with JAVA,if any exception is not catched  in any method then calling or  caller  method had a chance to catch the exception and do some necessary action

Public Class CallExternalService
      public void getADSLSpeed()


Public Class ADSLSpeedService

   CallExternalService service;
      public void  calculateSpeed()


             }catch(Exception e)


 As per above java code assume the that  CallExternalService is stage node no error handing is done so it sends error or exception to caller Service (ADSLSpeedService) where error is handing in Service level. 

In real time we will use common / default error handler mechanism for any service is not available or error while calling service from Stage or pipe line pair.

Ideally default error handler will do the following things

1) Insert the error in the DB for logging purpose
2) Trigger a mail to administrator depending on the fault.
3) Publish error in Queue with  with necessary information (using this information the operational team will do manual process) 

While doing error handling we need to make a note on a communication pattern i.e Synchronous or Asynchronous.

Important points while handling error

  •  If the error occurred in synchronous need to return minimum error information like error code,description and message id
  •  If the services are more alike Asynchronous then we need to have common error logging/audit framework which will receive errors
  •  through DB or JMS ,Based on error types we can notify or persist the error
  • fault context variable is available only in error handler.

While designing fault schema object consider the below important points 

  • Error Code
  • Error Descripition
  • Error Reference (i.e Service Name and Which operation)
  • Instance Id (This information you can get inbuilt function fn:uuid)
  • Error Type (System Error or Business Error)
  • Error Notification 

Tuesday, 12 November 2013

Book Review: Oracle SOA Governance 11g Implementation

Book: Oracle SOA Governance 11g Implementation 

To learn about Oracle SOA Governance, initially I had spent hours going through the documentation pages from Oracle and blogs. It was a hard job to read from different sources, in different order and to from a good understanding.

However, this book simplified my work, by presenting the concepts in a consolidated manner.

The few things that I liked about this book :

  1. Real world examples, making it quite easy to understand the concpets 
  2. Achieving Design time and Runtime governance using the Oracle Enterprise Repository (OER) and Oracle   Service Registry (OSR) 
  3. Good explanations on Oracle SOA Maturity Model 
  4. Understanding the SOA Governance and objectives

And most importantly, this seems to be the only book on Oracle SOA Governance.

So, I'd defenitely recommend this book, for those interested in this subject.

I received a free copy of this book to review.