Check the archives for lively discussions on the subject, and remember the
rule of thumb.

"Keep state closest to the objects that need it."

This may require you to cache state in both places (but not the *same*
state).

jim

----- Original Message -----
From: "Jorge Salas-Ortiz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 31, 2000 2:33 PM
Subject: Using HttpSession instead of a Stateful Session Bean


> Hello all,
>
> Have a question about using an HttpSession object
> *instead* of a Stateful Session Bean.  Is it
> adviceable?  If not, why?
>
> I need a mechanism to store user-specific data across
> multiple http requests (via JSP/servlets).  I was
> using the HttpSession object to store a Handle to the
> EJBObject (my Stateful Session object) then access
> data from the bean, but I can just as easily put that
> data in the HttpSession itself.  Plus, I don't have to
> worry about getAttribute and putAttribute like calls
> in the bean api and making those calls Remote
> compliant (i.e. Serializable, Remote)
>
> Any opinions or suggestions would be appreciated,
> thanks..
> jorge
>
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
>
>
===========================================================================
> 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".

Reply via email to