Session info across EJB (Stateful Session Beans ) vs HTTP Session vs modern frameworks

240 views Asked by At

Earlier days when I used to do coding, I used mostly Stateless Session Beans and all the info needed to traverse across pages was put in HTTP Session object. Back then(and even now) I never understood the "USP" of EJB being "transparent" and "safe" for "business layer" implementation with its round about ways of dealing with Skeleton and Stub and other jargons which were an overkill masquerading in the name of ease of use/secure. I was just wondering why exactly one would have used Stateful Session EJB, if the same can be accomplished via a SLSB + HTTPSession? Please dont give me the high level example of Shopping cart or bank app, as I already know that. I am looking for some answer that would be detailed on why coders chose SFSB over SLSB+HttpSession. Plus how are these session related stuff handled in your experience recently?

1

There are 1 answers

1
Henrique Fernandes Cipriano On

You are supposing that the view layer always is a http client. But the view layer can be architected in other ways. For example a Java Swing client application (Where the client server communication is done only with ejbs.

A question that helps diff SFSB vs HttpSession. Stateful Session Bean and HTTP Session