1 Reply Latest reply on May 24, 2011 8:16 AM by Mark Paluch

    Trick to Access HttpSession attributes from the Bussiness Tier

    Jean Baldessar Newbie

      Hi everybody.


      I have some web applications using the three tier architecture with the state kept in HttpSession and the business logic in stateless session beans.


      The logged user usualy is setted in a HttpSession attribute.


      The business logic in the stateless session beans method normaly envolves accessing some user attributes like 'useType' or something.


      I usualy pass the user object as a parameter for the business method when it's necessary.


      I sucks becouse sometimes business rules are added in methods that didn't had a user parameter before. A referente to user becomes required and the interface of the methods have to change.


      How do you deal with that kind of situation?


      You pass all the information required by the business logic as parameters or do some magic with statefull session beans or something?


      thanks in advance