Friday, October 22, 2010

SCA Spring Bean Components

Since Oracle SOA Suite 11g Patch Set 2, the Oracle SOA Suite uses the Spring Framework functionality provided by the WebLogic SCA (Service Component Architecture) of the Oracle WebLogic Server. The WebLogic Spring Container, based on the SCA Spring Component Implementation Specification, can be used for deploying Spring Components wired with SCA semantics. Actually the Oracle SOA Suite supports the Spring Framework version 2.5.6 which was released in November, 2008.

Oracle marries SCA technology with the benefits of the Spring Framework. Objects created by the Spring Container are called Spring Beans. The Spring Container is configured by loading XML configuration files containing bean definitions which provide the information required to create the beans. Objects can be obtained by means of Dependency Lookup and Dependency Injection. Dependency Lookup (DL) is a pattern where a caller asks the container for an object with a specific name or of a specific type. Dependency Injection (DI) is a pattern where the container passes objects by name to other objects, via constructors, properties, or factory methods.

Spring Bean development for the usage within an Oracle SCA Composite is easy and straightforward. Spring Beans will be created from new or existing Java classes which should become POJO services within the SCA Composite. The Spring Bean Component Editor is used to create a Spring Bean context definition. Based on a Spring Context, a SCA Spring Bean Component is created that transparently bridges the gap between Java and XML. Internally the Open Source EclipseLink MOXy JAXB implementation is used to map between Java classes and XML representations. Existing Spring Beans could be quickly reused on the Oracle SCA Container.

The Spring Bean context definition configuration XML file keeps the Spring context definition and shields the service implementation. The context definition configuration XML file will allow for Dependency Lookup and Dependency Injection.



Spring Beans complete the Oracle SOA platform. Enabling of Java POJOs as SCA Components was definitely a missing feature. The Spring Framework adds the power of Dependency Injection (DI), Aspect Oriented Programming (AOP) and a lot of simplified API abstraction to the Oracle SOA developers.

No comments: