in Technology by

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

1 Answer

0 votes
by

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
    What is Stateless Session Bean in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What is Stateful Session Bean in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What are the callback annotations for stateless bean?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Is Message Driven bean a stateless bean?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What are the callback annotations for stateful bean?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What a remote session bean is used in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    When a local session bean is used in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    What is a Session Bean in EJB?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Explain @javax.ejb.Stateless annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which of the following is a stateless protocol? (a) HTML (b) XHTML (c) HTTP (d) XML The ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
    Stateful Multilayer firewalls are also called ____________ (a) first generation firewalls (b) second generation firewalls (c) ... and answers pdf, mcq on Cyber Security pdf,...
asked Nov 4, 2021 in Education by JackTerrance
0 votes
    Explain @javax.ejb.Stateful annotation....
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    The required resources for communication between end systems are reserved for the duration of the session between end ... Circuit switching C. Line switching D. Frequency switching...
asked Jan 6, 2023 in Education by JackTerrance
0 votes
    I've Struts 1 action class (actions are singletons by design in struts 1) that needs to collect some ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I've Struts 1 action class (actions are singletons by design in struts 1) that needs to collect some ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
...