Show TOC

Procedure documentationViewing and Editing EJB Modules Locate this document in the navigation structure

 

Java EE Applications contain different modules such as EJB, Web, resource adapter, and application client modules.

In the SAP NetWeaver Administrator, you can view the EJB modules of the deployed applications, the enterprise beans that belong to each module, and the deployment properties of each enterprise bean and of the whole EJB module. You can also change the values of annotated EJB references, environment entries, and resource-adapter properties of the enterprise beans.

The following table shows the available editing operations and the types of beans they apply to.

Editing Option

Stateless Beans

Message-Driven Beans

Stateful Beans

Annotated EJB References

Environment Entries

Resource Adapter Properties

Prerequisites

You are in the   Configuration   Infrastructure   Application Modules   function.

Procedure

Viewing EJB Modules
  1. To filter the Module List so that it shows the EJB modules only, use the Type column filter.

  2. To view the settings of a deployed EJB module, select the module in the Module List.

    As a result, a list of the enterprise beans within the selected EJB module is displayed in the EJB Module Details area.

  3. To view configuration details of a particular bean, select the bean in the Enterprise JavaBeans list.

    Depending on the type of the selected bean (message-driven, stateless, or stateful), the relevant details are displayed in tabbed groups.

Editing Annotated EJB References
  1. To switch to editing mode, choose the Edit pushbutton.

  2. Choose the Environment and References tab.

  3. Select an annotated EJB reference.

  4. Choose the Select Reference Target pushbutton.

  5. Select a target from the Available Reference Targets list.

  6. Choose OK.

  7. To save your changes, choose the Save pushbutton.

Editing Environment Entries

An environment entry is a configuration parameter used to customize an enterprise bean's business logic. Environment entry values may have one of the following Java types: String, Character, Integer, Boolean, Double, Byte, Short, Long, and Float. You can configure the environment entry value without redeploying the whole application.

  1. To switch to editing mode, choose the Edit pushbutton.

  2. Choose the Environment and References tab.

  3. Select an environment entry.

  4. Specify a Value.

  5. To save your changes, choose the Save pushbutton.

Example Example

If you have an EJB TestBean that contains an environment entry QUEUE_CONNECTION_FACTORY of type String, you can modify its value after you have deployed the application by entering jmsfactory/default/QueueConnectionFactory in the Value field. After changing the bean's environment entry value, choose Save.

End of the example.

Note Note

By default, changing environment entries automatically restarts the application, if it has been started. If you do not want to restart the application after changing the bean's environment entries values, set the <restart-at-runtime-change> tag in the ejb-j2ee-engine.xml of the corresponding EJB module to false.

<?xml version="1.0" encoding="UTF-8"?>

<ejb-j2ee-engine xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="ejb-j2ee-engine_3_0.xsd">

<restart-at-runtime-change>false</restart-at-runtime-change>

</ejb-j2ee-engine>

When you set the <restart-at-runtime-change> tag to false, it is important that you do not keep references to that bean and its environment entries values. Instead, you have to look up the bean and its environment entry value each time you use it.

The same applies to Resetting Environment and References.

End of the note.
Resetting Environment and References

You can reset environment and references settings to the values defined in the application deployment descriptors.

  1. To switch to editing mode, choose the Edit pushbutton.

  2. Choose the Environment and References tab.

  3. Optionally, select an entry.

  4. To reset the selected entry, choose   Get Default   Value of Selected Row Entry  .

  5. To reset all entries in the list, choose   Get Default   Values of All Environment and Reference Entries  .

  6. To save your changes, choose the Save pushbutton.

Editing Resource Adapter Properties
  1. To switch to editing mode, choose the Edit pushbutton.

  2. Choose the Resource Adapter Properties tab.

  3. To add a new property, choose the Add Property pushbutton, then specify a Name and a Value, and choose OK.

  4. To remove a property, select the property and choose the Remove Property pushbutton.

  5. To reset the value of a particular property to the value defined in the application deployment descriptor, select the property and choose the Reset to Default pushbutton.

  6. To save your changes, choose the Save pushbutton.