Wednesday, April 20, 2011

OSB Project Structure

I am doing some development with Oracle Service Bus (OSB). The primary goal is to mediate web services using OSB. Oracle does provide set of eclipse plugins to develop OSB configuration - OEPE suite. One of question that I wanted answer was what will be a good project structure to organize various components of OSB configuration.

Typically, OEPE plugins gives two eclipse project templates:

  • Oracle Service Bus Configuration Project
  • Oracle Service Bus Project

OSB Config project is the top level project which can include various OSB Project. A minimal OSB project includes components like business service, proxy service and WSDL. It is important to come up with a good project structure since the component shows up as is on sbconsole. You probably don't want to see all the components at same level.

After this exercise, I ended up with following structure of the project that I wanted to share. So here it is,

The top level project - OSB Config Project - represents a business domain. So OSB configuration of all services serving a particular domain goes under that umbrella. Individual OSB Project contains mediation component for a given physical service. I used folders to group business and proxy services to allow for multiple proxy services for a given business service. Using this structure it becomes easy to manage configuration using sbconsole.

I ended up using the ant build script and import/export WLST script by tweaking the ones given as part of this book - The definitive guide to SOA. The build script can export configuration from local server or workspace. Import deploys it to the target server. The import/export script also takes care of variables that changes from environment to environment. OSB has a features to create customization XMLs. You can create customization XML per environment and run it post configuration package deployment.

2 comments:

Pino said...

Hi!, excuse me, but iam trying to export projects from an OSB domain, and import that projects inside another OSB domain, but when the build.xml is being executed, it stop launching the message "Problem: failed to create task or type wlst"
I need some help with this because I need to migrate the projects for the next week, thanks a lot!

Kartik Shah said...

@Pino That error usually comes when WLST is not on your class path.

You need to make sure that for wlst has attribute classpathref pointing to correct WLST class path.

Look at this gist to get how to setup WLST taskdesk: WLST ant task setup for OSB