InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.4: Administering EJB containers (overview)

6.6.4: Administering EJB containers (overview)

A container configuration provides information about an enterprise bean container. The administrator can specify several properties to address basic questions about the container location and behavior.

Specifying the server in which the container will reside

Each enterprise bean container resides in a particular application server.

When the administrator adds a new container to the WebSphere administrative domain, he or she must associate the container with a particular server (also known as the container's parent).

An application server can host multiple containers.

Specifying how beans in the container will get database connections

Every container can support the two main bean types, session beans and entity beans:

  • Entity beans require database connections because they store permanent data.

  • Session beans do not require database access, though they can obtain it indirectly (as needed) by accessing entity beans.

A data source is an administrative resource that defines a pool of database connections. Servlets and enterprise beans use data sources to obtain database connections.

When configuring a container, the administrator can specify a default data source for the container. This data source will be the default data source used by any entity beans installed in the container that use container managed persistence (CMP).

When configuring a CMP entity bean, the administrator can specify which data source the container must use for managing the persistent state of the entity bean. If the administrator specifies a data source for an individual CMP entity bean then this data source will override any data source specified on the container.

Specifying a default data source is optional if each CMP entity bean in the container has a data source specified in it configuration. If a default data source is not specified and a CMP entity bean is installed in that container without specifying a data source for that bean then it will not be possible to start that CMP entity bean.

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

Specifying how the container will manage cached bean instances

Each container keeps a cache of bean instances for ready access. The WebSphere administrator specifies settings governing the cache size and a policy for removing unused items from the cache.

Specifying where the container will passivate beans to make room in its cache

A container can passivate session beans to make room in its cache. The container saves a serialized session bean to a file. It restores the bean to the cache when more room is available.

The WebSphere administrator specifies a passivation directory in which to keep the files.

Go to previous article: Invoking your own classes during application server startup and shutdown Go to next article: EJB container properties

 

 
Go to previous article: Invoking your own classes during application server startup and shutdown Go to next article: EJB container properties