bea.com | products | dev2dev | support | askBEA
 Download Docs   Site Map   Glossary 
Search

Administration Console Online Help

 Previous Next Contents Index  

EJB

Enterprise JavaBeans (EJB) are reusable Java components that implement business logic and enable you to develop component-based distributed business applications. EJBs reside in an EJB container, which provides a standard set of services such as persistence, security, transactions, and concurrency. Enterprise JavaBeans are the standard for defining server-side components. WebLogic Server's implementation of the Enterprise JavaBeans component architecture is based on Sun Microsystems EJB specification.

The EJB specification defines the following four types of Enterprise JavaBeans:

Via the Administration Console, you can configure, target, deploy, stop, redeploy, display information about and monitor the performance of EJBs. These tasks are covered in subsequent sections.

 


Tasks

Deploying a New EJB Module

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, click Deployments.
  3. In the left pane of the Console, click EJB modules. A table displays in the right pane of the Console showing all the deployed EJB modules.
  4. In the right pane of the Console, select the Deploy an EJB module option.
  5. Locate the .jar file you would like to deploy. You can also configure an exploded component directory. This archive must be located on the administration server. If not, browse for the file and upload it to the administration server by clicking "click here".
  6. Select the EJB module by selecting the radio button next to it.
  7. Click Target Module. If there is only one server in your domain, proceed to the next step. Otherwise, skip to step 9. in Deploying a New EJB Module
  8. Your EJB module is targeted to the only server in your domain. To finish up, enter a name by which to identify this EJB module and click Deploy.

    The Console displays the Deploy panel, which lists deployment status and deployment activities for the EJB module.

  9. If there is more than one server in your domain, select the clusters and/or servers on which you would like to deploy the EJB module, and click Continue.
  10. Specify how servers will access this EJB module's source files. There are two options:
  11. To finish up, enter a name by which to identify this EJB module and click Deploy.

    The Console displays the Deploy screen, which lists deployment status and deployment activities for the EJB module.

Note: If an EJB module is packaged into an .ear file (i.e., is part of an application) you cannot deploy it for the first time individually. You can only deploy it at the application level. See Deploying a New Enterprise Application or Web Service.

Configuring an EJB Module

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can use the Administration Console's Configuration Tab and its sub-tabs to configure the EJB module.

The following table summarizes the tasks you perform via each Configuration sub-tab:

Table 8-1 Configuration sub-tabs and tasks

Sub-tab

Task(s)

General

Display the name and path of the EJB module for all EJB modules and display staging mode and configure load order for standalone EJB modules.

See Displaying and Configuring General Information.

Descriptors

  • Display the name of the EJB module and its type

  • Modify values of tuning-related deployment descriptor elements for this EJB module

  • Display a read-only version of the all EJB deployment descriptors: ejb-jar.xml, weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml

See Configuring Deployment Descriptor Values.

Compiler options

  • Configure which java compiler to use to compile this EJB module and other compilation-related information

See Configuring Compiler Options.

Displaying and Configuring General Information

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can display general information about the EJB module and, for a standalone EJB module, configure its load order and display its staging mode.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Configuration tab
  4. Click the General sub-tab

    The right pane of Console displays the EJB module's name and Path and, for standalone EJB modules, the EJB module's staging mode.

  5. To specify the order at which the EJB module is loaded at startup (standalone EJB modules only), enter a value for Load Order and click Apply.

Configuring Deployment Descriptor Values

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can:

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Configuration tab
  4. Click the Descriptors sub-tab

    The EJB module name and its type are displayed in the right pane.

  5. To view a read-only deployment descriptor file, click its name. Your choices are:
  6. To modify the tuning-related deployment descriptor elements for the EJB module, click the EJB module name in the right pane. The tuning-related deployment descriptor elements for this EJB module are listed.
  7. Enter new values for the elements you want change.
  8. Click Apply.

Configuring Compiler Options

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can configure compiler options for this EJB module.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Configuration tab.
  4. Click the Compiler options tab.
  5. Enter the Java compiler to be used for the EJB module.
  6. Enter the temporary path to be used for the EJB module.
  7. Enter any extra RMIC options to be used.
  8. Check the box to enable or disable the ability to keep generated source files.
  9. Check the box to enable or disable forced regeneration of wrapper classes.
  10. Click Apply.

Viewing an EJB Module's Deployment Status

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can configure view this EJB module's deployment status.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Deploy tab

    The EJB module's deployment status is displayed in the right pane. The following table describes possible deployment statuses:

    Table 8-2 Summary of EJB module deployment statuses

    Deployment Status

    Meaning

    Active

    The module is deployed.


    Inactive

    The module is not deployed, either because the deployment attempt failed, or because the module was stopped.

    Failed

    The deployment attempt failed.

Stopping or Redeploying an EJB Module

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can stop the EJB module, if it is currently deployed; or redeploy it if it is currently stopped.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Deploy tab
  4. Click Stop to stop a deployed EJB module.
  5. Click Redeploy to redeploy a stopped EJB module.

Setting an EJB Module's Target Server and/or Cluster

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can set this EJB module's target server(s) and cluster(s).

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.Click the Targets tab in the right pane.
  3. Click the Targets tab
  4. To deploy to individual servers, select one or more server instances from the Independent Servers list and click Apply.
  5. To deploy to a cluster of servers, select the name of the cluster from the Clusters list and click Apply.

    By default, the Administration Console deploys an EJB module to all server instances in the cluster (the All servers in the cluster option). If you want to deploy only to a subset of the servers in a cluster, select Parts of the cluster, and then select the individual server instances to which you want to deploy the EJB module.

Monitoring Stateless Session EJBs

Once you have deployed or attempted to deploy a stateless session EJB (see Deploying a New EJB Module), the server knows that it exists and the EJB name appears in the left pane of the console. At this point, you can monitor statistics about this EJB.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Monitoring tab.

    A table listing statistics about the EJB displays in the right pane.

Monitoring Stateful Session EJBs

Once you have deployed or attempted to deploy a stateful session EJB (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can monitor statistics about this EJB.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Monitoring tab.

    A table listing statistics about the EJB displays in the right pane.

Monitoring Entity EJBs

Once you have deployed or attempted to deploy an entity EJB (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can monitor statistics about this EJB.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Monitoring tab.

    A table listing statistics about the EJB displays in the right pane.

Monitoring Message-Driven EJBs

Once you have deployed or attempted to deploy a message-driven EJB (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can monitor statistics about this EJB.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Monitoring tab.

    A table listing statistics about the EJB displays in the right pane.

Testing an EJB Module

Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane of the console. At this point, you can test the EJB module to verify that it can be located via its JNDI name.

  1. Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Testing tab.

    If the test succeeds, the following message is displayed:

    The EJB_name has been tested successfully with a JNDI name of JNDI_name.

    If the test fails, the following message is displayed:

    The EJB EJB_name has not been tested successfully. There was a problem determining the JNDI Name of the given bean.

Adding or Editing EJB Module Deployment Notes

  1. Once you have deployed or attempted to deploy an EJB module (see Deploying a New EJB Module), the server knows that it exists and the EJB module name appears in the left pane Select the Domain in which you will be working.
  2. In the left pane of the Console, select the EJB module. Standalone EJB modules are listed under Deployments --> EJB Modules. EJB modules that are packaged into an application are listed under Deployment --> Applications, under the sub-node for the application name.
  3. Click the Notes tab.
  4. Add or edit the optional information in the Notes scroll box.
  5. Click Apply.

 

Back to Top Previous Next