Use Java annotations for Service Component Architecture (SCA) to identify existing Java Platform, Enterprise Edition (Java EE) components, such as web modules, as SCA components that are a part of an SCA composite.
Identify and obtain the web module that represents 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 servlets, filters, and event listeners to consume SCA services. By using Java annotations that apply to SCA, you can enable existing web modules to be recognized as an SCA component and participate in an SCA composite.
Web modules can 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. You can configure a web module with annotations to acquire references to services that are wired to the component by the SCA assembly. 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 web modules, see the SCA specifications and APIs documentation.
<%@ taglib uri="http://www.osoa.org/sca/sca_jsp.tld" prefix="sca" %>
<sca:reference name="service" type="test.MyService" />
<% service.sayHello(); %>
You now have SCA-enabled Java EE web modules that take advantage of the SCA programming model.
Deploy the components to a business-level application.