Administration Console Online Help
EJB
[Attributes and Console Screen Reference for 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 that provides a standard set of services, including 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.
Using the Administration Console, you can configure, target, deploy, stop, redeploy, display information about and monitor the performance of EJBs.
For information about types of EJBs, design considerations, and development topics, see Programming WebLogic Server Enterprise Java Beans.
Tasks
These topics provide instructions for performing command tasks for EJBs using the Administration Console:
Deploying a New EJB Module
Follow these steps to deploy an EJB that is packaged in a .jar file or an exploded .jar directory.
- In the left pane of the Console, select the Deployments-->EJB Modules node.
EJBs that are packaged in a .jar file or an exploded .jar directory are listed.
Note: EJB modules that packaged in an enterprise application are listed under Deployment --> Applications, under the node for the application name. To deploy an EJB that is packaged in an enterprise application, see Deploying a New Enterprise Application or Web Service.
- In the right pane of the Console, select the "Deploy an EJB module" option.
- On the "Select the archive for this application" page, browse to the archive file, or the exploded component directory that you want to deploy, select the radio button next to the item and click Target Module.
Note: If the item you want to deploy is not available on the administration server, select "upload your files" to upload it.
- On the "Select targets for this module" page, select the servers and/or clusters to which you want to deploy the EJB module, and click Continue.
- On the "Review your choices and deploy" page, specify how servers access the EJB's source files. There are two options:
- Copy the EJB onto every target.
- Enter the location from which all targets access the EJB's source files.
- On the "Review your choices and deploy" page, enter a name by which to identify the EJB and click Deploy.
The Deploy tab displays the deployment status for the EJB module.
For an overview of deploying from the Administration Console, see Deploying Applications and Modules.
Configuring an EJB Module
After you have deployed or tried to deploy an EJB that is packaged as a .jar or an exploded.jar directory, the EJB name appears in the left pane of the console. Use the Deployments-->EJB-->Configuration tab to configure the EJB module.
The Deployments-->EJB-->Configuration tab contains the following pages:
- General—This page displays the name, path, staging mode, and load order for an EJB.
See Displaying and Configuring General Information.
- Descriptors—This page allows you to:
- View the name of the EJB module and its type.
- Modify values of tuning-related deployment descriptor elements for the EJB module.
- Display a read-only version of the EJB deployment descriptors:
ejb-jar.xml
, weblogic-ejb-jar.xml
and weblogic-cmp-rdbms-jar.xml.
See Configuring Deployment Descriptor Values.
- Compiler options—This page allows you to configure the Java compiler and associated options for compiling the EJB.
See Configuring Compiler Options.
Displaying and Configuring General Information
Follow these steps to configure or display information for a deployed EJB module:
- In the left pane of the Console, select the Deployments-->EJB Modules node.
EJBs that are packaged as a .jar or a exploded .jar directory are listed.
Note: EJB modules that packaged in an enterprise application are listed under Deployment --> Applications, under the node for the application name.
- Select the desired EJB module, and select the Configuration--> General tab.
The right pane of Console displays:
- Name—the name for the deployment.
- Path—the path to the archive or application directory.
- Load Order—the order in which the EJB module is loaded at startup. To set or change the load order, enter a numerical value and click Apply.
- Staging Mode
For attribute descriptions, see EJB --> Configuration --> General.
Configuring Deployment Descriptor Values
The Configuration-->Descriptors tab under the Deployments-->EJB Modules node allows you to:
- Display a read-only version of the all EJB deployment descriptors:
ejb-jar.xml
, weblogic-ejb-jar.xml
and weblogic-cmp-rdbms-jar.xml
for a deployed EJB module.
- Configure selected deployment descriptor element values for an EJB that is deployed as an exploded application.
Follow these steps to configure selected deployment descriptor values for an EJB that is deployed as an exploded application:
- In the left pane of the Console, select the Deployments-->EJB Modules node.
Standalone EJB modules are listed. (EJB modules that packaged in an enterprise application are listed under Deployment --> Applications, under the sub-node for the application name.
- Select the desired EJB module, and select the Configuration-->Descriptors tab.
For exploded EJBs, the EJB name and its type are displayed in the right pane.
- Click the EJB module name in the right pane.
Selected deployment descriptor elements for the EJB module are listed.
- Enter new values for the elements you want change, and click Apply.
- To view a read-only deployment descriptor file, click its name.
For attribute descriptions, see EJB --> Configuration --> Descriptors.
Configuring Compiler Options
Follow these steps to configure compiler options for a deployed EJB module:
- In the left pane of the Console, select the Deployments-->EJB Modules node.
EJBs that are packaged as a .jar or an exploded .jar directory are listed.
Note: EJB modules that packaged in an enterprise application are listed under Deployment --> Applications, under the sub-node for the application name.
- Select the Configuration--> Compiler options tab.
- Enter the Java compiler to be used for the EJB module.
- Enter RMI compiler options.
- Enter EJB compiler options.
Note: You can specify RMI and EJB compiler options at the server level, on the Server --> Configuration --> General page. The EJB-level setting takes precedence over the server-level setting.
- Check the box to enable or disable the ability to keep generated source files.
- Check the box to enable or disable forced regeneration of wrapper classes.
For attribute descriptions, see EJB --> Configuration --> Compiler options.
Viewing an EJB Module's Deployment Status
To view an EJB's deployment status:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJB modules that are packaged in an enterprise application .ear are listed under Deployment --> Applications, under the node for the application.
The EJB module's deployment status is displayed in the right pane.
- 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
To stop a deployed EJB, or redeploy a stopped EJB:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJBs that are packaged in an enterprise application .ear are listed under Deployment --> Applications, under the node for the application.
- Select the desired EJB, and click the Deploy tab.
The EJB Deployments page displays the deployment status of the EJB:.
- 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.
- Click Stop to stop a deployed EJB module, or click Redeploy to redeploy a stopped EJB module.
Setting an EJB Module's Target Server and/or Cluster
To target an EJB to one or more servers or clusters:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJB modules that are packaged in an enterprise application .ear are listed under Deployment --> Applications, under the node for the application.
- Select the desired EJB, and click the Targets tab.
Servers and clusters in the domain are displayed.
- Select the individual server(s) and/or cluster(s) to which you wish to deploy the EJB and click Apply.
By default, the Administration Console deploys an EJB to all server instances in the cluster (the "All servers in the cluster" option). To deploy the EJB to selected servers in a cluster, select "Part of the cluster", and then select the individual server instances to which you want to deploy the EJB.
Monitoring EJBs
To monitor a deployed EJB:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJB modules that are packaged in an enterprise applications .ear are listed under Deployment --> Applications, under the node for the application.
- Select the desired EJB, and click the Monitoring tab.
A table listing statistics about the EJB displays in the right pane. For descriptions of the data, see:
- You can monitor the EJB on a single server, or on all servers to which it is deployed. Select the deployment you wish to monitor from the Select Servers drop-down list.
Testing an EJB
To test an EJB:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJB modules that are packaged in an enterprise application .ear, are listed under Deployments --> Applications, under the node for the application.
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 Deployment Notes
To add or edit EJB deployment notes:
- Select the Deployments --> EJB Modules node in the left pane of the Console.
After you expand it, the Deployments --> EJB Modules node lists the EJBs that are packaged in a .jar or an exploded .jar directory that you have deployed, or tried to deploy.
Note: EJB modules that are packaged in an enterprise application .ear are listed under Deployment --> Applications, under the node for the application.
- Add or edit the optional information in the Notes scroll box.