Importing and exporting packages in EJB-JAR format

An EJB-JAR file contains the implementation classes, interface classes, and deployment descriptor for one or more beans. You can use a Java development tool such as Sybase PowerJ to define and develop beans and create an EJB-JAR file. You can import JAR files in the EJB 1.0, EJB 1.1, or EJB 2.0 formats. EAServer Manager reads the JAR file and creates a package containing a component for each bean in the JAR file.

NotePowerJ deploys Enterprise JavaBeans directly to EAServer If you are developing in PowerJ, use the Enterprise JavaBeans Deployment Wizard to install EJB components to EAServer. If using another IDE, use EAServer Manager to import the bean as described below.

StepsImporting an EJB 1.1 or 2.0 JAR file

  1. Start EAServer Manager if it is not already running, and connect to the server where you want to install the component.

  2. Highlight the top-level Packages folder. Choose File | Deploy | EJB JAR.

  3. Enter the path to the EJB-JAR file.

  4. Choose the Deployment Strategy from the options described in Table 9-1.

    Table 9-1: Deployment strategy options

    Deployment strategy

    Specifies

    Full deployment

    The importer generates IDL for every class defined in the JAR, regardless of whether the interface already exists. Use this option when deploying components for the first time or when you want to restore IDL types that have been changed or deleted.

    Incremental deployment

    The importer generates IDL only when the Java types and interfaces have changed from the last time it was imported. The following are compared:

    • Methods

    • Fields

    • Interfaces

    • Superclass

    Use this option if you redeploying components and have changed some interfaces or parameter types.

    Optimistic deployment

    Similar to Incremental, except that the check for changed classes in each package ends if the first class comparison indicates no change. Use this option if you are redeploying components, and have changed only the implementation classes.

  5. Configure the Deployment Options:

  6. Click Finish.

EAServer Manager creates a new package that contains a component for each bean defined in the JAR file, printing status messages and warnings to the Deploy Wizard. The new package has the same name as the EJB JAR display name. If there is no display name, the new package has the same name as the JAR file. For each bean in the EJB-JAR, EAServer creates an EJB component with the same name as the ejb-name element in the EJB-JAR deployment descriptor.

NoteHome names for imported EJB components EAServer sets an imported bean’s home name to the EAServer default, package/component, where package is the EAServer Manager package name, and component is the EAServer Manager component name.

NoteUse the status dialog as a to-do list In the deployment status dialog box, EAServer Manager display warnings for each setting that requires further attention before running the application. You can copy and paste this text to a text editor to use as a to-do list.