If I serialize only the handle of the SFSB then won't that object be garbage
collected after the client session is over?
Then how shall we carry the conversational state across the session..?
Please clarify..?

Regards
Yogaraj

-----Original Message-----
From: Fred Loney [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 9:02 PM
To: [EMAIL PROTECTED]
Subject: Re: Comparision!


Half of the difference between SFSB and HttpSession is that SFSB is not
tied to the web client in the manner stated. The other half of the
difference is that SFSB _is_ tied to EJB-managed resources in a way that
HttpSession is not, e.g. transaction context and db connection. As with
all of EJB, one could replicate the EJB functionality on the side, in
this case maintaining the relevant conversational state in HttpSession
attributes and managing the resources independently, but why bother?

Regarding holding a SFSB reference in a HttpSession attribute, storing
the Local or Remote instance is sufficient. If it were desirable to
retain conversational state across client web sessions, then the SFSB
handle could be serialized to a file or database and restored later.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com

----- Original Message -----
From: "Mike Dunbar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 19, 2002 5:43 AM
Subject: Re: Comparision!


> I assume you mean the HttpSession when you say "a session object that
> we are using normally". Well, they are really just different animals
> altogether. What they do have in common is that they are associated
> with no more than one user at a time, hence the term "session".
>
> One huge difference is that a Stateful Session Bean (SFSB) is not
> neccesarily tied to a web client, as is an HttpSession object. An
> HttpSession object is allocated by the Servlet container for each web
> client, and will remain dedicated to that client throughout the user's
> "web session". An instance of a SFSB is allocated by the EJB container
> to each client that creates one, and will remain dedicated to that
> client until that client calls remove() on the EJB. Note that the
> timeperiod for which the SFSB was dedicated to a client does not
> neccessarily coincide with that of the clients web session.
> Furthermore, if the SFSB instance was to be associated with a web
> client for more than one http request, you would probably need to
store
> a reference (Handle?) to it in the HttpSession - someone correct me if
> I'm wrong, I haven't actually done that.
>
> There are many more differences. EJBs have more sophisticated
features,
> in general.
>
> Mike
>
>
>
> --- "It, Cockpit (CAP, Contractor)" <[EMAIL PROTECTED]> wrote:
> > Hi All,
> > I have a basic query to ask to the experts. Whats the differents
> > between
> > Statefull session bean and a session object that we are using
> > normally to
> > maintain the session?
> > Please give me some clear idea about the both.
> >
> > Regards
> > Yogaraj
> >
> >
> > "THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR
> > THE
> > ADDRESSEE and may contain confidential and privileged information.
> > If the reader of this message is not the intended recipient,
> > you are notified that any dissemination, distribution or copy of
this
> > communication is strictly Prohibited.
> > If you have received this message by error, please notify us
> > immediately, return the original mail to the sender and delete the
> > message from your system."
> >
> >
>
========================================================================
===
> > 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".
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.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".


"THIS E-MAIL MESSAGE ALONG WITH ANY ATTACHMENTS IS INTENDED ONLY FOR THE
ADDRESSEE and may contain confidential and privileged information.
If the reader of this message is not the intended recipient,
you are notified that any dissemination, distribution or copy of this
communication is strictly Prohibited.
If you have received this message by error, please notify us
immediately, return the original mail to the sender and delete the
message from your system."

===========================================================================
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