#### To configure EJB settings

1. In the tree component, select the Configuration node.
2. Select the EJB Container node.
3. Set the session store location.

   The Session Store Location field specifies the directory where passivated beans and persisted HTTP sessions are stored on the file system.

   Passivated beans are enterprise 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.

4. Set the Commit Option.

   The Commit Option field specifies how the container caches passivated entity bean instances between transactions.

   Option B caches entity bean instances between transactions, and is selected by default. Option C disables caching.

5. Under Pool Settings in the Initial and Minimum Pool Size field enter the minimum number of beans the container creates in the pool.
6. In the Maximum Pool Size field enter the maximum number of beans the container maintains in the pool, at any time.
7. In the Pool Resize Quantity field enter the number of beans that will be removed from the pool if they are idle for more than the time specified in Pool Idle Timeout.
8. In the Pool Idle Timeout field enter the time, in seconds, that a bean in the pool can remain idle before it will be removed from the pool.
9. Adjust the maximum cache size in the Max Cache Size field.

   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.

10. Adjust the cache resize quantity in the Cache Resize Quantity field.

    When the maximum number of cached beans is reached, the container removes a number of passivated beans from the backup store, set to 32 by default.

11. Adjust the time, in seconds, after which stateful session beans are removed from the cache or passivated store in the Removal Timeout field.
12. Configure the policy the container uses to remove stateful session beans in the Removal Selection Policy field.

    The container decides which stateful session beans to remove based on the policy set in the Removal Selection Policy field. There are three possible policies the container uses to remove beans from the cache:

    - Not recently used (NRU)

    - First in, first out (FIFO)

    - Least recently used (LRU)

    The NRU policy removes a bean that hasn’t been used recently. The FIFO policy removes the oldest bean in the cache. The LRU policy removes the least recently accessed bean. By default, the NRU policy is used by the container.

    Entity beans are always removed using the FIFO policy.

13. Adjust the rate, in seconds, at which the cache cleanup is scheduled for entity beans in the Cache Idle Timeout field.

    If a cached entity bean has been idle a certain amount of time, it is passivated. That is, the bean’s state is written to a backup store.

14. Click Save.
15. Click Load Defaults if you want to restore the default values for the EJB settings parameters.
16. Restart the Application Server.

###### See Also

- To configure MDB pool settings

- To configure the EJB Timer Service