Chapter 2: Deploying and Configuring EJB Components


Deploying an EJB-JAR file

EJB components can be deployed in an EJB-JAR file. The EJB-JAR file packages the component classes and a deployment descriptor in the standard Java archive (JAR) format. The deployment descriptor describes the components included in the JAR and sets standard properties such as the home and remote interface names, transaction attribute values, required user roles, and so forth.

You can use several tools to create EJB-JAR files, including Ant, Eclipse, and popular IDEs such as Borland JBuilder. You can deploy the EJB-JAR to EAServer using several tools including:

StepsDeploying EJB-JARs with the Management Console

  1. Start the Management Console and connect to EAServer as described in Chapter 1, “Getting Started,”in the System Administration Guide.

  2. In the Management Console, right-click the EJB Modules folder in the left pane and choose Deploy. The Deploy wizard pages appear in the right pane. Fill in the Wizard settings as listed in the table below.

    Setting

    Explanation

    File Name

    Enter the full path to the EJB-JAR file, or browse to select the file.

    Module Name

    Enter a name for the package to be created. The default is the base name of the EJB-JAR file.

    Overwrite if Package Already Exists.

    Enable to overwrite an existing package that has the same name.

    Do Validation During Deployment

    Enable to enforce validation of the XML deployment descriptor. In accord with the J2EE specification, this option is enabled by default. Disabling validation may allow you to deploy archives that have invalid XML but are otherwise correctly packaged.

    Server Name

    The name of the server to install the module to. The default is the name of the server that you are connected to.

    Install Module Into Selected Server

    Deselect if you don’t want the package installed into any server. The package must be installed in a server before clients of that server can call the components.

    Directory Name

    If you specify a directory name, EAServer creates a copy of the archive file in the specified directory. The copy is identical to the source, except that an EAServer configuration file is added to the META-INF directory. The directory must exist and be a full path or a path relative to the EAServer bin directory.

    Click Finish on the final wizard page. The Management Console deploys the EJB-JAR and shows the deployment status in the right pane. When your browser finishes downloading the status page, scroll to the bottom. You see Build Successful if everything went ok.