By using Java™ annotations that apply to Service Component Architecture (SCA), you can enable an existing Java Platform, Enterprise Edition (Java EE) component to be recognized as an SCA component and participate in an SCA composite.
The SCA programming model supports Java EE integration. As a result, you can take advantage of SCA annotations to enable the Java EE components, such as session beans, message driven beans, or Web components to consume SCA services.
Annotations supported by SCA are listed in the following table:
Annotation class | Annotation | Properties |
---|---|---|
org.osoa.sca. annotations. ComponentName.class |
The @ComponentName annotation specifies the injection of a component name. |
|
org.osoa.sca. annotations. Context.class |
The @Context annotation specifies to
inject SCA context into a service component instance. When you inject a composite context for the component, the type of context is defined by the type of the Java class field or type of the setter method input argument. Specify the type as either ComponentContext or RequestContext. |
|
org.osoa.sca. annotations. Property.class |
The @Property annotation specifies to
inject configuration properties from service component configuration. You can inject a simple Java type or a complex Java type. The type of the property injected is defined by the type of the Java class field or type of the setter method input argument. You can use this annotation on protected or public fields, on setter methods, or on a constructor method. |
|
org.osoa.sca. annotations. Reference.class |
The @Reference annotation specifies the
injection of a service reference. The interface of the service injected is defined by the type of the Java class field or the type of the setter method input parameter. |
|