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".

Reply via email to