Workload management for enterprise beans and application servers

When you create cluster members, WebSphere Application Server automatically enables workload management for the application servers and enterprise beans in the cluster.

WebSphere Application Server uses a cluster to identify which application servers participate in workload management. Each application server in the cluster is a cluster member. Workload management distributes client requests among the application servers in the cluster.

How enterprise beans participate in workload management

The workload management service provides load balancing for these types of enterprise beans:

The reason that instances of stateful session beans are treated differently than instances of stateless session beans has to do with how their state is managed. Because stateless session beans do not maintain state information, all instances of a stateless session bean are identical. Each client request that the bean processes is treated as a completely independent request.

In contrast, stateful session beans store state information that must be shared among multiple and consecutive client requests that are part of a logical sequence of operations. Each instance of a stateful session bean is unique. It exists in only one application server and can be accessed only by directing requests to that particular application server.

Different application servers can not share specific instances of a stateful session bean. However, creating cluster members of an application server that contains a stateful session bean creates cluster members of the home object of that stateful session bean. Clustering the home object of stateful session bean enables an application to create new instances of those beans in an application server. Cluster members of an application server can contain multiple instances of a specific stateful session bean, but each instance is unique and can not be shared.

Entity beans exist in a container only within the context of a transaction, regardless of whether the beans are transactional. Workload management uses transaction affinity to direct client requests for entity beans. After an application server is selected, client requests for that entity bean are forwarded to it for the duration of the transaction. Using workload management is possible only when option B or option C caching is enabled in the container. For a description of caching options, see Entity bean assembly settings. Go to Help documentation