All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en.help.ref-ejbgeneral.html Maven / Gradle / Ivy

There is a newer version: 4.1
Show newest version

Enterprise Java Beans (EJB)

Use the Enterprise Java Beans (EJB) page to configure settings for the EJB container.

In addition to general settings for enterprise beans, you can configure pool settings and cache settings.

  • Pool settings apply only to stateless session beans. By default, the container maintains a pool of enterprise beans in order to respond to client requests without the performance hit that results from creating the beans.

    If you experience performance problems in an application that uses deployed enterprise beans, you can help improve the applications's performance by creating a pool or by increasing the number of beans maintained by an existing pool.

  • Cache settings apply only to stateful session beans. The container maintains a cache of enterprise bean data for the most used enterprise beans. This allows the container to respond more quickly to requests from other application modules for data from the enterprise beans.

    Cached enterprise beans are in one of three states: active, idle, and passivated. An active enterprise bean is currently being accessed by clients. An idle enterprise bean’s data is currently in the cache, but no clients are accessing the bean. A passivated bean’s data is temporarily stored and is read back into the cache if a client requests the bean.

The Enterprise Java Beans (EJB) page contains the following options.

Load Defaults

Button to restore settings that have default values to their default values. Settings that do not have default values are not changed.

Configuration Name

The name of the configuration to which the settings on this page apply. This field is read only.

Session Store Location

The directory where passivated stateful session beans and persisted HTTP sessions are stored on the file system. The default value is ${com.sun.aas.instanceRoot}/session-store.

Passivated beans are stateful session beans that have had their state written to a file on the file system. Passivated beans typically have been idle for a certain period of time, and are not currently being accessed by clients. Similarly, persisted HTTP sessions are individual web sessions that have had their state written to a file on the file system.

Commit Option

Specifies how the container caches passivated bean instances between transactions. If you select Option B (the default), the container caches a ready instance between transactions. If you select Option C, the container does not cache a ready instance between transactions.

Initial and Minimum Pool Size

The minimum number of beans to be maintained in the pool. The default value is 0.

Maximum Pool Size

The maximum number of beans that the container can maintain in the pool at one time. The default value is 32.

Pool Resize Quantity

The number of beans that are removed from the pool if they are idle for more than the time specified in the Pool Idle Timeout field. The value must be at least 0 and less than the Maximum Pool Size value. The default value is 8.

Pool Idle Timeout

The time, in seconds, that a bean in the pool can remain idle before it is removed from the pool. After this amount of time, the bean is destroyed. A value of 0 means that a bean can remain idle indefinitely. The default value is 600.

Max Cache Size

The maximum number of beans to be held in the cache. Increase the maximum number of beans to cache to eliminate the overhead of bean creation and destruction. However, if the cache is increased, the server consumes more memory and resources. Be sure your operating environment is sufficient for your cache settings. A value of 0 indicates an unbounded cache. The default value is 512.

Cache Resize Quantity

The number of beans to passivate when the cache is full. When the maximum number of cached beans is reached, the container removes a number of passivated beans from the backup store. This value also specifies the number of beans to be created if a request arrives when the pool has no available beans. The value must be greater than 1 and less than the Max Cache Size value. The default value is 32.

Removal Timeout

The number of seconds after which a passivated bean is removed from the session store. A value of 0 specifies that the container does not remove inactive beans automatically. If the Removal Timeout value is less than or equal to the Cache Idle Timeout value, beans are removed immediately without being passivated. The default value is 5400.

Removal Selection Policy

The policy the container uses to remove stateful session beans from the cache. The choices are as follows:

Not recently used (NRU)

Removes a bean that hasn’t been used recently. This value is the default.

First in, first out (FIFO)

Removes the oldest bean in the cache.

Least recently used (LRU)

Removes the least recently accessed bean.

Cache Idle Timeout

The maximum number of seconds that a bean can remain idle in the cache. After this amount of time, the container can passivate this bean. A value of 0 specifies that beans never become candidates for passivation. The default value is 600.

Additional Properties

Additional properties for the EJB container. The GlassFish Server does not define any additional properties for the EJB container.

Related Tasks
Related asadmin Commands

None.

Copyright © 2005, 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices




© 2015 - 2024 Weber Informatics LLC | Privacy Policy