+

Search Tips   |   Advanced Search

EJB bundles

An EJB bundle is a bundle containing EJBs and that can be deployed in an OSGi container. An EJB bundle is an OSGi bundle version of an EJB JAR file.

We use an EJB bundle in an OSGi application in much the same way using an EJB JAR file in a Java enterprise application. For example, we use EJBs to implement the business logic of the application.

An EJB bundle contains a manifest file, META-INF/MANIFEST.MF. This file contains the same minimum set of manifest headers any OSGi bundle manifest contains (for example Bundle-SymbolicName and Bundle-ManifestVersion), plus the Export-EJB header; it is the presence of the Export-EJB header that identifies the bundle as an EJB bundle.

We use the manifest headers to describe your EJB bundle in OSGi terms, and to specify the support that we want from the OSGi Applications runtime environment. For example, we do not need to package dependencies inside an EJB bundle; we can instead specify these dependencies in a manifest header and have the runtime environment provision them for you.

If we use a deployment descriptor XML file to define your EJB metadata, then the file must be located at META-INF/ejb-jar.xml. Any IBM binding files must be located in the META-INF folder; for example, META-INF/ibm-ejb-jar-bnd.xml.

We can convert an existing EJB JAR file to an EJB bundle by adding OSGi metadata to the file; Rational Application Developer provides tooling to help simplify this task.


Related:

  • Enterprise bundle archives
  • Composite bundles
  • Application bundles, use bundles and provision bundles
  • Web application bundles
  • Bundle and package versioning
  • Enterprise OSGi standards
  • Converting an EJB JAR file to an OSGi EJB bundle




    File name: was328.html

    prettyPrint();