0
What are the differences between stateful session bean and stateless session bean?

Open 1 Answers 42 Views Technology

What are the differences between stateful session bean and stateless session bean?

1 Answer

0

Following are the differences between stateful session bean and stateless session bean:

  • EJB Container creates a separate stateful session bean to process client's each request.whereas EJB Container normally creates a pool of few stateless bean's objects and use these objects to process client's request.

  • As soon as request scope is over, statelful session bean is destroyed but stateless bean remains active.

  • A stateful session bean is a type of enterprise bean which preserve the conversational state with client. A stateful session bean as per its name keeps associated client state in its instance variables Whereas because of pool of stateless session beans, instance variable values are not guaranteed to be same across lookups/method calls in stateless session beans.

by (280k points)
...