Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need advice on a J2EE Project

 
Murat Balkan
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)

Thanks for your comments
Murat
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Murat,

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic