Encapsulate the "client" in some sort of client class. Store any EJB
references, client cached data etc int the Client objects(or object model
etc). Then store this object in the HttpSession object that you can get at
within a servlet. You will need some sort of key sent back from the
HttpRequest to ensure you access the correct HttpSession (see encoding a key
in the URL or using a cookie).
I have used this method to get HTML/Forms <---->
SERVLET(S)<------>EJB<------> Database
Cheers
Regards
Rob Masters
> -----Original Message-----
> From: Mike [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, 25 March 1999 03:20
> To: [EMAIL PROTECTED]
> Subject: Servlets -> EJB Session Persistence
>
> My question is how do I maintain session state when using HTML, Servlets
> and EJB's?
>
> Scenario:
> 1) An HTML client(view) invokes a servlet. 2) The servlet(controller)
> calls an EJB Session bean (Model). 3)The Servlet sends a response back to
> the client and terminates. The HTML client invokes the servlet to do
> something
> else, and so on.
>
> Question:
> 1) How do you maintain a reference to the Session Bean once the Servlet
> destroy() method is called?
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".