You can use OSGi applications as component implementations in Service Component Architecture (SCA) composite applications. You can use SCA to link between OSGi applications, and between an OSGi application and another component type such as a Java™ EE application, a Java Message Service (JMS) resource, or a web service.
The SCA programming model supports the use of OSGi applications as SCA component implementations. You can expose an OSGi application as an SCA service by writing code that defines the application as an SCA component and enables the application to participate in an SCA composite. For more information, see Using OSGi applications as SCA component implementations.
You can declare transaction policy at the services level to describe the transactional contract that the service provider offers to the consumer, following the SCA interaction intents model for transactions. For an OSGi application, you declare the interaction intents for services in a module Blueprint file. The interaction intent is associated with a service entry in the standard OSGi manner: by recording the intent as a service property in the service registry. For more information, see Transactions and OSGi Applications.
When a service is exported by an application, it is registered in the WebSphere® Application Server global service registry. This registry is available throughout the configuration domain for the application, which means that it is available throughout the OSGi framework instance in which the exporting application is hosted, and throughout the OSGi framework instances of all other OSGi application containers in the same OSGi application configuration domain.
If an OSGi application imports a service reference, that service must be resolved from the global service registry. To resolve references to services that are outside the configuration domain for the application, you can install proxy services into the global service registry.
An OSGi bundle or a web application bundle (WAB) can look up and invoke an EJB directly. However, you can also include your OSGi application in an SCA environment, and the SCA modules can be configured to bind to EJB modules.