You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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

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 be also presented with all the EJBs that the container is holding. The following figures illustrate the portlet layout.

Stateful Container

Configuring

In the the config.xml, find the "EJBNetworkService" gbean and add this gbean next to it:

config.xml
<gbean name="DefaultStatefulContainer">
    <attribute name="properties">
       TimeOut=20
       PoolSize=1000
       BulkPassivate=100
    </attribute>
</gbean>

Properties

Each property is as follows:

Property Name

Description

TimeOut

Specifies the time to wait between invocations. This
value is measured in minutes. A value of 5 would
result in a time-out of 5 minutes between invocations.
A value of zero would mean no timeout.

Default value is 20.

PoolSize

Specifies the size of the bean pools for this
stateful SessionBean container.

Default value is 1000.

BulkPassivate

Property name that specifies the number of instances
to passivate at one time when doing bulk passivation.

Default value is 100.

Stateless Container

Configuring

In the the config.xml, find the "EJBNetworkService" gbean and add this gbean next to it:

config.xml
<gbean name="DefaultStatelessContainer">
    <attribute name="properties">
       TimeOut=0
       PoolSize=10
       StrictPooling=true
    </attribute>
</gbean>

Properties

Each property is as follows:

Property Name

Description

TimeOut

Specifies the time to wait between invocations. This
value is measured in milliseconds. A value of 5 would
result in a time-out of 5 milliseconds between invocations.
A value of zero would mean no timeout.

Default value is 0.

PoolSize

Specifies the size of the bean pools for this
stateless SessionBean container.

Default value is 10.

StrictPooling

StrictPooling tells the container what to do when the pool
reaches it's maximum size and there are incoming requests
that need instances.

With strict pooling, requests will have to wait for instances
to become available. The pool size will never grow beyond the
the set PoolSize value.

Without strict pooling, the container will create temporary
instances to meet demand. The instances will last for just one
method invocation and then are removed.

Default value is true.

  • No labels