+

Search Tips   |   Advanced Search

Converting an EJB JAR file to an OSGi EJB bundle

When converting an EAR file to an enterprise bundle archive (EBA) file, you complete manual tasks to convert any enterprise bean (EJB) JAR files in the EAR file to OSGi EJB bundles.

To convert an EJB JAR file to an OSGi application bundle, complete the following steps:

  1. Define general bundle metadata by adding the following headers to the bundle manifest file, META-INF/MANIFEST.MF:

    Bundle-ManifestVersion

    The version of the syntax in which the bundle manifest file is written. For OSGi Service Platform Release 4, set the value to 2.

    Bundle-Name

    A human-readable name for the bundle.

    Bundle-SymbolicName

    A non-localizable name that identifies the bundle uniquely.

    Bundle-Version

    The version of the bundle. See description of the Bundle-Version header in the bundle manifest file.

    Import-Package

    The external packages on which the bundle depends. See description of the Import-Package header in the bundle manifest file.

    Export-Package

    The packages that are visible outside the bundle. See description of the Export-Package header in the bundle manifest file.

  2. Define bundle-type-specific metadata by adding the following headers to the bundle manifest file:

    Export-EJB

    The presence of this header identifies the bundle as containing enterprise beans that are to be loaded and run by the EJB container. Optionally, we can specify, as the value of the this header, the list of enterprise beans to export as OSGi services. See description of the Export-EJB header in the bundle manifest file.


Related:

  • Enterprise bundle archives
  • Enterprise JavaBeans and OSGi Applications
  • EJB bundles
  • Converting a web application archive file to an OSGi web application bundle
  • Converting a utility JAR file to an OSGi bundle
  • Converting a persistence archive file to an OSGi bundle
  • Converting Java 2 security settings in an enterprise application to OSGi
  • Example: OSGi bundle manifest file




    File name: was1524.html

    prettyPrint();