Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt

An Enterprise JavaBeans(EJB) container is used to provide a run-time runtime environment for enterprise beans within the application server. The container handles operation of EJBs and also act acts as an intermediary between the business logic layer and the rest of the Java EE environment.

In Geronimo, OpenEJB is included as a plugin to manage EJBs.

In Geronimo you only have a single container each for Stateless and Stateful session beans and in OpenEJB , stateless and stateful session beans have only one container each. In OpenEJB, the pool size is set per container. You Therefore, you can set only a one pool size for all stateless beans and another one for all stateful beans.

To configure the default properties of each container, you can do it either from Console or by editing either use the administration console or edit the config.xml file manually. The only difference is that you must stop the server first if you choose to update config.xml manually; while using the Consoleadministration console, you can restart OpenEJB module on-the-fly.

...

Understanding the configuration

We'll take Take the EJB container DefaultStatefulContainer as an example here. By looking into config.xml, we you can see the container is defined as followedfollows:

Code Block
xml
xml
titleconfig.xml
    ...  
      <gbean name="DefaultStatefulContainer">
            <attribute name="timeout">${StatefulTimeout}</attribute>
            <attribute name="capacity">${Capacity}</attribute>
            <attribute name="bulkPassivate">${BulkPassivate}</attribute>
       </gbean>
...

...

Code Block
xml
xml
titleconfig-substitutions.properties
    ...  
      Capacity=1000
      StatefulTimeout=20
      BulkPassivate=100
 ...

Which means if If you want to configure any of the properties, change the numbers in config-substitutions.properties or update config.xml after the server is stopped. Here is an example by updating that updates config.xml directly:

Code Block
xml
xml
titleconfig.xml
    ...  
      <gbean name="DefaultStatefulContainer">
            <attribute name="timeout">${StatefulTimeout}</attribute>
            <attribute name="capacity">500</attribute>
            <attribute name="bulkPassivate">${BulkPassivate}</attribute>
       </gbean>
 ...

And then restart Restart the Geronimo to make the changes take effect.

...

The EJB Server portlet that displays the EJB containers available in the server and their status is available by selecting EJB Server on the Console Navigation menu on the left hand side. You will also be also presented with all the EJBs that the container is holding. The following figures illustrate the portlet layout.


Expand the tree and find the container that you want to configure, input . Input the value and click Update . After that, the Console administration console will prompt the following message:
The openejb configuration should be restarted for the changes that were made to the fields to take effect. The changed fields are now shown in red color.



To restart the openejb module on-the-fly, click Application->System Modules on the left panel and check select the Expert Mode check box. Then find org.apache.geronimo.configs/openejb/2.2-SNAPSHOT/car and click Restart to make your changes take effect.

...