EJB container settings

Use this page to configure and manage the EJB container of this application server.

To view this administrative console page, click Servers > Application Servers > server_Name > EJB Container Settings > EJB container.

Configuration tab

Passivation directory

Specifies the directory into which the container saves the persistent state of passivated stateful session beans. This directory must already exist. It is not automatically created.

Stateful session beans with an activation policy of TRANSACTION are passivated at the end of the transaction in which they are enlisted, and stateful session beans with an activation policy of ONCE (default) are passivated when the number of active bean instances becomes greater than the cache size specified in the container configuration. When a stateful bean is passivated, the container serializes the bean instance to a file in the passivation directory and discards the instance from the bean cache. If, at a later time, a request arrives for the passivated bean instance, the container retrieves it from the passivation directory, deserializes it, returns it to the cache, and dispatches the request to it. If any step fails (for example, if the bean instance is no longer in the passivation directory), the method invocation fails.

Attention: If you define a class-level persistence unit or extended persistence context for a stateful session bean or any associated interceptor class, then the stateful session bean cannot be serialized. Passivation for that stateful session bean fails. If you have defined an extended persistence context (container-managed) or a persistence unit (application-managed), which is always considered to be extended, then stateful session bean holds a reference to an entity manager. If the entity manager is in the open state, then the stateful session bean cannot be serialized and passivation fails.

To resolve this problem, add a pre-passivate interceptor method to the stateful session bean that closes an open entity manager and add a null value to the entity manager field prior to any passivation attempt. This approach allows the stateful session bean to be passivated without failure because it is now serialized. Allowing the activation policy for the enterprise bean to default to the Once value is not a complete solution to this problem. An activation policy of Once causes the enterprise bean instance to not be passivated on transaction boundaries. However, it does not prevent passivation if the stateful session bean is evicted from the enterprise bean cache when the cache becomes full. When the enterprise bean is evicted from the cache, it is passivated. This problem only occurs when the application is under load. Therefore, the solution of using the pre-passivated interceptor to close the entity manager and set the entity manager field to null is the only complete solution to the problem.

Allowing the activation policy for the enterprise bean to default to the Once value is not a complete solution to this problem. An activation policy of Once causes the enterprise bean instance to not be passivated on transaction boundaries. However, it does not prevent passivation if the stateful session bean is evicted from the enterprise bean cache when the cache becomes full. When the enterprise bean is evicted from the cache, it is passivated. This problem only occurs when the application is under load. Therefore, the solution of using the pre-passivated interceptor to close the entity manager and set the entity manager field to null is the only complete solution to the problem.

Inactive pool cleanup interval

Specifies the interval at which the container examines the pools of available bean instances to determine if some instances can be deleted to reduce memory usage. This setting is for all bean pools. Attention: Stateful session beans are NOT pooled, so this applies to stateless session and entity bean pools.

Data type Integer
Units Milliseconds
Range 0 to 2 147 483 647

Default data source JNDI name

Specifies the JNDI name of a data source to use if no data source is specified during application deployment. This setting is not applicable for EJB 2.x-compliant CMP beans.

Servlets and enterprise beans use data sources to obtain these connections. When configuring a container, you can specify a default data source for the container. This data source becomes the default data source used by any entity beans installed in the container that use container-managed persistence (CMP).

The default data source for a container is secure. When specifying it, you must provide a user ID and password for accessing the data source.

Specifying a default data source is optional if each CMP entity bean in the container has a data source specified in its configuration. If a default data source is not specified and a CMP entity bean is installed in the container without specifying a data source for that bean, applications cannot use that CMP entity bean.

Enable stateful session bean failover using memory-to-memory replication

Specifies that failover is enabled for all stateful session beans installed in this EJB container.

This checkbox is disabled until you define a replication domain. This selection has a hyperlink to help you configure the replication settings. If no replication domains are configured, the link takes you to a panel where you can create one. If at least one domain is configured, the link takes you to a panel where you can select the replication settings to be used by the EJB container.

Data type Checkbox
Default Unselected
Range Selected or unselected.

Initial state

Specifies the execution state requested when the server first starts.

Data type String
Default Started
Range Valid values are Started and Stopped



Related concepts
EJB containers
Related tasks
Managing EJB containers
Related reference
EJB cache settings
EJB container system properties
EJB Timer Service settings
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 2:56:59 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=uejbecnt
File name: uejb_recnt.html