Using non-SCA enhanced Java EE applications as SCA component implementations
You can use an existing Java™ Platform, Enterprise Edition (Java EE) application as a Service Component Architecture (SCA) component without requiring SCA annotations or composite files.
Before you begin
Identify the Java EE application that contains business logic in Enterprise JavaBeans (EJB) or web modules to enable in the SCA environment.
A Java EE application is also called an enterprise application or enterprise archive (EAR) file.
About this task
The SCA programming model supports Java EE integration. You can expose EJB stateless session beans as SCA services by enabling an existing enterprise application module to be recognized as an SCA component and participate in an SCA composite.
You can use an enterprise application as an SCA component implementation, without requiring any SCA annotations or composite files in the application. Such an application is denoted as a non-SCA enhanced enterprise application.
The EJB business interfaces of stateless session beans configured in EJB modules are exposed as SCA services. The EJB business interfaces of EJB references configured in EJB and web modules are exposed as SCA references.
The component type of a non-SCA enhanced enterprise application is defined as follows:
- Each EJB 3.x session bean business interface with unqualified
name
intfof a session bean with mapped namemnametranslates into a service by the namemname_intf. - The service interface that is derived from the business interface of an EJB 3.x session bean consists of all methods of the EJB business interface.
- The service interface is remotable if it is derived from a remote
business interface. Each EJB 3.x remote reference of each session
bean within the enterprise application is exposed as an SCA reference.
If the remote reference has the name
refand the name of the session bean isbeanname, the SCA reference name isbeanname_ref. Services thus derived can be invoked or wired to like an SCA service.
Procedure
Results
The enterprise application is available as an SCA component type. Any SCA component can refer to the derived services.
What to do next
Deploy the enterprise application and the SCA composite that uses the application as composition units of the same business-level application. You can use the administrative console or wsadmin commands to create the business-level application and add the enterprise application and the SCA composite as composition units.
The product provides the HelloJee sample. The sample has a non-SCA enhanced EJB. The Example section in the Using existing Java EE modules and components as SCA implementations topic summarizes how to deploy the HelloJee sample and access the non-SCA enhanced EJB.