88. Compare stateless and statefull session bean

Stateless Session Beans

Stateful Sessions Beans

Are pooled in memory, to save the overhead of creating a bean every time one is needed. WebLogic Server uses a bean instance when needed and puts it back in the pool when the work is complete.

Stateless sessions beans provide faster performance than stateful beans.

Each client creates a new instance of a bean, and eventually removes it. Instances may be passivated to disk if the cache fills up.

An application issues an ejbRemove() to remove the bean from the cache.

Stateful sessions beans do not perform as well as stateless sessions beans.

Have no identity and no client association; they are anonymous.

Are bound to particular client instances.Each bean has an implicit identity. Each time a client interacts with a stateful session bean during a session, it is the same object.

Do not persist. The bean has no state between calls.

Persist. A stateful session bean’s state is preserved for the duration of a session.

2 Responses

  1. Good Work………
    Thanks a lot……………

  2. good going sharat.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: