You can deploy OSGi and Service Component Architecture (SCA) applications to servers or clusters as assets, which you add to a business-level application by creating composition units.
This topic assumes that you have already created an OSGi application packaged as an enterprise bundle archive (EBA) file and an SCA composite definition packaged as a Java archive (JAR) file.
An SCA composite packaged with a Web archive (WAR) file cannot use the implementation.osgiapp component.
To deploy an OSGi application that uses SCA, create a business-level application that includes the EBA and SCA assets. You can use the administrative console or wsadmin commands to create the business-level application, import the EBA file and SCA composite as assets, and then add the EBA and SCA assets as composition units to the business-level application.
An EBA composition unit consists of the imported asset (the EBA file), plus any configuration information for the OSGi application context roots, virtual hosts, and resource bindings. If a deployed OSGi application is to be extended using composite bundles extensions, apply all extensions to the EBA composition unit (cu) and update the OSGi application to the latest deployment version. You must install all service import and exports that are provided by composite bundle extensions before you can add the SCA asset as a composition unit to a business-level application. For information on using and deploying OSGi composite bundle extensions, see the topic on extending a deployed OSGi application.
For implementation.osgiapp, the component implementation value for the composition unit is the application symbolic name and version.
The following deployment restrictions apply to EBA files:
For information about these and other restrictions, see the topic on multiple SCA implementation packaging considerations.
The business-level application has OSGi and SCA composition units. You can now start the business-level application.
If the ServiceRuntimeException Unable to access OSGi application framework occurs when starting the business-level application, ensure that the SCA composition unit has a higher starting weight than the EBA composition unit.
If the ServiceRuntimeException Unable to obtain service service from application occurs, check SystemOut.log and SystemErr.log files for messages from the Blueprint container indicating that the run time cannot start the Blueprint service.
If the java.lang.TypeNotPresentException occurs when starting the business-level application, a bundle that uses one of the supported SCA annotations is not importing the org.osoa.sca.annotations package. Update the bundle manifest to import this package.
If you must delete a composition unit from the business-level application, delete the SCA composition unit before attempting to delete the EBA composition unit, otherwise the product returns an error. An EBA composition unit that provides the implementation cannot be deleted until the SCA composition unit that uses the implementation.osgiapp is deleted.
In this information ...Related tasks
| IBM Redbooks, demos, education, and more(Index) |