I  know one place where u may not be right..every request creates a thread of an 
instance of a servlet . An instance of a servlet will be made  in the startup, after 
that its just a thread of that instance for every request.

Shelly Aggrawal wrote:

> Dear All,
> I'm Writing an Application in which a Servlet is used to Access a Stateful Session 
>Bean , which in turn accesses multiple Entity beans.The Stateful Session Bean manages 
>the workflow and maintains the Client State .
>
> Here in this Application we are supposed to add items to a shopping cart .
>
> But as a Servlet State is not maintained across across multiple requests from a 
>Client  , what is the use of Stateful Session Bean?
> I can maintain the Client Session state in a Servlet by a Cookie , and the shopping 
>Cart contents in a temporary Database on the Server associated with the Client 
>Session state.
>
> But then the Stateful Session Bean has no use here . Because each time the Servlet 
>has to create a new instance of the session bean, as each time a new Instance of the 
>Servlet will be invoked for each request from the Client.So am I Better off using 
>stateless Session Bean instead of Stateful Session Bean.Or is there any other 
>alternative to this solution or am I wrong somewhere.
>
> Thanks for Reading,
> Parikshit
>
>
> ---
> To unsubscribe, mail [EMAIL PROTECTED]
> To get help, mail [EMAIL PROTECTED]

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