Hi all, I am working on a J2EE project and I need your thoughts about a design issue.
The system I am working on does not include a DB instead an API that accepts commands via HTTP posting. It works like this: At first you pass U/P to the API and if the login is successful it returns a unique sesion id. You issue other commands with attaching this session id to the request. I have written the posting engine. However I have doubts on the EJB tier. Should I use a SLSB or SFSB on EJB tier. (I am considering to put the session id into a web server side session object.)
Should I use a SLSB or SFSB on EJB tier. (I am considering to put the session id into a web server side session object.)
At first you should ask yourself the question whether you need EJBs at all. If for some reasons you decide that an EJB container is required, then remember that as a rule of thumb it�s always better to use SLSB + HttpSession when possible. A very good reason is that SFSBs don�t scale very well, while SLSBs do. Another reason is that usually HttpSession information gets much better replicated across the cluster than SFSB session data.