I might be missing something here and I hope you guys can clear it up. I am
following the J2EE architecture DB-EntityBean-StateFul Session
Bean-Servlet-Applet. Primarily I would like one session bean to attend to
all calls from the applet-servlet for one session. I would consider the
session here to be the time the applet inits and it dies. During the
session, the applet would make several post/get calls to the servlet. It
would be NICE if the same session bean could hold the state during session
rather than the servlet between the post/get calls for one client. The ideas
I am getting from this thread is that the "session" for a session bean is
what happens during one post/get call of the servlet and not of the final
client which is the applet.
So it is the responsibility of the servlet to hold the state during the
session rather than that of the session bean. The problems I see is that the
HttpSession object (I have not used this before and hence feel free to
correct me) might not be highly dependable due its use of cookies, url
redirection or ssl if we have a not so willing client. I am hoping for a
solution where a session bean would hold the state of the real session i.e
of the applet which is the final and real client.
Thanks,
Subu
> -----Original Message-----
> From: Subrahmanyam Allamaraju [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 15, 2000 6:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Servlets & Session Bean
>
>
> > 1. Create your session bean right before you use it, in
> the doPost/doGet
> > method of your servlet, or
>
> This is fine.
>
> > 2. Create an object pool of session beans during servlet
> initialization.
> > The object pool would be an instance variable of your
> servlet and manage
> the
> > allocation/deallocation of beans to your web clients.
>
> But there is no need to manage this object pool of beans. That's the
> container's job.
>
> > 2. One stateless session bean can be swapped to serve many clients,
> whereas
> > one stateful session bean ONLY serves ONE client.
>
> Check the spec again (page 39)! A session bean (whether stateful or
> stateless) is meant to serve one client.
>
> Regards,
>
> Subbu
>
> ==============================================================
> =============
> 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".