A Service Component Architecture (SCA) application can access a Service Data Objects (SDO) 2.1.1 HelperContext object. This object either uses DefaultHelperContext annotation or implements a application programming interface (API) that uses the commonj.sdo.helper.SDO class.
Install Feature Pack for SCA Version 1.0.1 and enable SDO. Instructions on enabling the SDO feature are in the installation topics for your operating system.
Read SDO data binding for SCA applications to better understand how to work with SDO in SCA Java clients and implementations.
Develop one or more SCA composites that use SDO following a top-down or bottom-up approach.
This topic describes how to create and access SDO HelperContext in SCA applications. For information about accessing SDO HelperContext in non-SCA applications, see Creating and accessing SDO HelperContext objects.
Because the SCA run time manages the HelperContext objects and identifiers when using SDO in SCA applications, the method used to create and access SDO HelperContext in SCA applications is different from that used in non-SCA applications. An SCA application can access SDO HelperContext using a DefaultHelperContext annotation, @DefaultHelperContext.
Alternatively, an SCA application can implement an API that uses the commonj.sdo.helper.SDO class, to obtain the same SCA-managed HelperContext instance. This approach is an alterative to the annotation. To use this approach, pass the String ID of the SCA-managed HelperContext, which is sca-default, into the SDO.getHelperContext method.
You can access the default HelperContext programmatically in a Java or Java Platform, Enterprise Edition (Java EE) component implementation type using either annotation injection or an API. You cannot access the default HelperContext programmatically in a Spring component implementation type. When you use an OSGI application as an implementation of an SCA component, you can access the default HelpContext instance using the API mechanism. However, you cannot access the instance using the annotation injection mechanism.
You have written code that accesses the default HelperContext.
Develop one or more SCA composites that use SDO following a bottom-up or top-down approach.
In this information ...Related concepts
Related information
| IBM Redbooks, demos, education, and more(Index) |