0 votes
in Technology by (323k points)

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

1 Answer

0 votes
by (323k points)

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.

Related questions

0 votes
1 answer
asked Nov 7, 2020 in Technology by JackTerrance (323k points)
0 votes
1 answer
asked Nov 7, 2020 in Technology by JackTerrance (323k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
...