Bean cache settings are WebSphere® Application Server extensions to the Enterprise JavaBeans specification. You
can define bean cache settings for an enterprise bean.
Procedure
- Switch to the Java™ EE perspective.
- In the Enterprise Explorer view, expand an EJB module at
2.1 or earlier specification-level, right-click the deployment descriptor
and select .
- On the Beans page of the editor,
select a bean and find the Bean Cache section
under the WebSphere Extensions
section.
- In the Activate at field, select
one of the following values to specify the point at which an enterprise
bean is activated and placed in the cache:
- ONCE: Indicates that the bean activates
when it is first accessed in the server process, and passivates (and
is removed from the cache) at the discretion of the container, for
example, when the cache becomes full. If you select to activate at
ONCE, then all five of the options listed below are available.
- ACTIVITY_SESSION: Indicates that the
bean activates and passivates as follows:
- On an ActivitySession boundary, if an ActivitySession context
is present on activation
- On a transaction boundary, if a transaction context (but no ActivitySession
context) is present on activation
- On an invocation boundary
- TRANSACTION: Indicates that the bean
activates at the start of a transaction and passivates (and is removed
from the cache) at the end of the transaction.
- In the Load at field, select one
of the following values to specify when the bean loads its state from
the database. The value of this setting implies whether the container
has exclusive or shared access to the database:
- ACTIVATION: Indicates that the bean loads
when it is activated (regardless of Activate at setting) and implies
that the container has exclusive access to the database.
- TRANSACTION: Indicates that the bean
loads at the start of a transaction and implies that the container
has shared access to the database
- INTERVAL: (For EJB 2.x CMP beans only)
Indicates that the bean loads at intervals, determined by the integer
set in the Load at interval field.
- DAILY: Indicates that the bean loads
its state on a daily basis.
- WEEKLY: Indicates that the bean loads
its state on a weekly basis
- If you select INTERVAL for the load
at field, you then indicate the length of time (in seconds) that the
reload occurs. The interval is entered as an integer. The INTERVAL
option is only available when activate is set to ONCE and Load at
is set to INTERVAL; at this point, the reload interval text box is
activated.
Results
After you define the bean cache settings, you can click
Remove to remove the bean cache settings.
For more
information about bean cache settings, see the EJB containers topic available in the WebSphere Application Server
Information Center documentation.