Enterprise Bean Settings
Enterprise Bean -> General tabbed pane -> Sun-specific
Settings
button -> Sun-specific Settings dialog box -> EJB Settings view
In the EJB Settings dialog box, you can edit the enterprise bean's
deployment settings.
- In the General sub-pane:
- The JNDI name is used for registering with the Sun Java
System
Application Server 8. This is a required field. If the bean is a
message-driven
bean, this is the JNDI name of the Java Message Service destination
resource
object associated with the message-driven bean class.
- The Principal Name is an EJB that has the run-as role
specified.
- Select the Pass By Reference. If false,
then this
EJB uses pass-by-value semantics. If true, then this EJB uses the
pass-by-reference
semantics.
- The IOR button opens a dialog allowing you to set the
Interoperable
Object References (IOR) security configuration.
- In the Bean Pool sub-pane:
- Steady Pool Size specifies the initial and minimum number of
bean instances that should be maintained in the pool.
- Resize Quantity specifies the number of bean instances to be
created if a request arrives when the pool is completely busy (subject
to
the limit specified in the Max Pool Size field). The possible values
are
0 to MAX_INTEGER.
- Max Pool Size specifies the maximum number of bean instances
that can be created to satisfy client requests. The possible values are
from
0 to MAX_INTEGER.
- Pool Idle Timeout In Seconds specifies the maximum time, in
seconds, that the bean instance is allowed to remain idle in the pool.
When
this timeout expires, the bean instance in a pool becomes a candidate
for
passivation or deletion.
- Max Wait Time In Milliseconds specifies the maximum time, in
milliseconds, the caller waiting to get a bean from the free pool will
wait
before getting a connection timeout. If the value specified is 0, wait
time
in infinite. If overflow is not allowed, some currently cached
instances might be passivated to make room for the new instance. When
all else fails, an exception is thrown.
- In the Bean Cache sub-pane:
- Max Cache Size specifies the maximum number of beans
allowable
in the cache.
- Resize Quantity specifies the number of bean instances to be
created if a request arrives when the pool is completely busy (subject
to the limit specified in the Max Pool Size field) The possible
values are 0 to MAX_INTEGER.
- Cache Idle Timeout In Seconds specifies the maximum time that
a stateful session bean or entity bean is allowed to be idle in cache.
When
this timeout expires, the bean instance in a pool becomes a candidate
for
passivation or deletion.
- Removal Timeout In Seconds specifies the amount of
time a bean
instance can remain passivated. If the bean is not accessed before this
timeout
expires, the passivated bean is removed and is no longer accessible to
the
client.
- Is Cache Overflow Allowed specifies if the Max Cache Size
value is a hard limit or not. Sometimes many entity beans are needed
to be added to a cache, exceeding the max-cache-size. When this element is set to
true,
occasionally the size of the cache can be exceeded. The size will
reduce
gradually when beans are passivated or removed programmatically. If
this
element is set to false, and if the cache size exceeds the Max Cache
Size
limit, then a CacheOverFlowException is thrown.
- Victim Selection Policy specifies the algorithm to use for
picking victims when a pool needs to shrink. Victims are generally passivated
into a backup store (typically a file system or database) that is
cleaned
during startup. The following implementation choices are possible:
- The victims are removed from the cache.
- The victims are converted into soft references. This way,
the objects stay in memory but do not prevent the garbage collector
from
picking these objects, if memory runs very low.
The backup store is monitored by a background thread (or sweeper
thread)
to remove unwanted entries. If no victims could be selected, then the
value
in the Is Cache Overflow Allowed field will determine if a
CacheOverFlowException is thrown or not.
The possible values are:
- First In, First Out (fifo)
- Least Recently Used (lru)
- Not Recently Used (nru)
- If the enterprise bean is of the type
Entity, you can also specify
settings in the Entity Settings sub-pane:
- Read Only specifies that the bean is a read-only bean that is
never modified by an EJB client.
- Commit Option specifies the commit option that is
used on transaction completion.
- Refresh Period In Seconds specifies the rate at which a
read-only bean must be refreshed from the JDBC datasource. Values are 0 (never
refreshed)and positive number (refreshed at specified intervals).
See also
IOR Configuration
Legal Notices