2 Replies Latest reply on Jan 28, 2003 5:37 AM by magnus

    HttpSession and BMP ejb

    magnus Newbie


      i have a problem with a BMP ejb. In brief I have a number of Oracle datasources. the bmp must use the correct datasource. Unfortunately the information as to which datasource to use is stored in a stateful session bean which in turn is in the HttpSession of the calling servlet. Is there a way to access either the stateful session bean for this user or the entire HttpSession from within the EJB BMP.

      Since the data is the datasource to connect to I cannot pass it as a parameter to the bean implenmentation method since ejbLoad and ejbStore take no params. Additionally if the data is passed to the creation/finder methods and then set as a class variable on the bmp the value of the class variable has reverted to its default value in between ejbFindByBlah() and ejbStore() being called (due to set Entity Context being called i assume?)

      Does anyone know of a way i can access the httpsession object for this session from within the ejb or an alternative solution.