I do not get it what is the difference between these sessions, if it's only based on performance?
The satateful bean is used to 'maintain users conversation state'. Considering that users state in web tier is managed through HttpSession (through an ID correctly),
does it measn when I pass some object from web tier to ejb, sesion id is passed too?
Or, when it said that stateful beans are used to maintain conversational state it mean only a rhetorically right? there is no some kind of id-trasmission between web tier and ejb tier, or it does? Dows Statefull beans have principle of storing some kind of HttpSession passed by web tier (if it does I donot see purpose of it)
If communication occurs mediating through web tier, user conversational state is maintained through HttpSession, only?!?!
We can use Statless bean with session facade in web tier, where we have an instance of stateless bean, and that instance invoke some method, inside what are encapsulated some business methods.
And here I come to conclusion (if my exposed opinion is correct) that only lyfecycles and performance issues, are peculiarities what make distinctions between these two beans.
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Independent Consultant — Author, EJB 3 in Action — Expert Group Member, Java EE 6 and EJB 3.1
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |