Discussions

EJB programming & troubleshooting: Session Maintenance

  1. Session Maintenance (3 messages)

    I have a JSP file for the front end, servlet in the middleware for communication with EJB. Can any body give me some idea about managing sessions between JSP to Servlet and Servlet to EJB for the same clients.

    Threaded Messages (3)

  2. Session Maintenance[ Go to top ]


    JSP pages and servlet will share the same HTTP session.
    You have an MVC implementation, dont you ?

    You can create a stateful session bean for each of HTTP sessions. Keep EJB handle of you'r SFSB in a session variable.

    Maris
  3. Session Maintenance[ Go to top ]

    Hey Maris,

    Do you mean putting the handle to the SFSB in the Http Session. Is that a good idea, any drawbacks, concerns??

    Thanks,

    Mandeep
  4. Session Maintenance[ Go to top ]


    >Do you mean putting the handle to the SFSB in the Http
    > Session.

    Yes, I mean that. I think it's a good idea.

    You have to store information about created SFSBs somewhere
    anyway.

    But you have to make sure that session of SFSB lives
    a bit longer than HTTP session.

    Maris