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

Compare with Current View Page History

« Previous Version 2 Next »

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