Use Java annotations for Service Component Architecture (SCA) to identify existing Java Platform, Enterprise Edition (Java EE) components, such as message-driven beans, as SCA components that are a part of an SCA composite.
Identify and obtain the message-driven beans that represent your business logic that you want to enable within an SCA environment.
The SCA programming model supports Java EE integration. As a result, you can take advantage of SCA annotations to enable Java EE web components such as message-driven beans to consume SCA services. By using Java annotations that apply to SCA, you can enable existing message-driven beans to be recognized as an SCA component and participate in an SCA composite.
Message-driven beans can only participate in SCA assembly as the implementation type of a component that does not offer services, even though you can configure or wire the component to other services. Because of the association with endpoints that are not controlled by SCA such as Java Message Service (JMS), do not instantiate message-driven beans arbitrarily. You must not use a message-driven bean as a service component implementation more than one time within the SCA assembly of the application package.
You can configure a message-driven bean that is defined as an implementation type of an SCA component with annotations in order to obtain references to services that are wired to the component by the SCA assembly by using the @Reference annotation. You can also use annotations when you want to obtain the value of a property using the @Property annotation, to inject a handle to the SCA component context using the @Context annotation or to obtain the component name using the @ComponentName annotation.
For a list of supported annotations for message-driven beans, see the SCA specifications and APIs documentation.
You now have SCA-enabled Java EE message-driven beans to take advantage of the SCA programming model.
Deploy the components to a business-level application.
In this information ...Related concepts
Related tasks
| IBM Redbooks, demos, education, and more(Index) |