> As I understand when the client invokes a create method on the home
> object, the container instantiates the corresponding bean and then
> invokes the beans ejbCreate method.
> Here is my question when thousand clints tries to access the same
> bean at the same time, does the container creates thousand
> of such objects from the abstract factory pattern?

That is correct. The factory will create N instances of the bean.  N depends
on whether the bean is stateful or stateless but suffice it to say that EJB
is thread safe and concurrent access to the same instance of any bean
(exception for some implementations of EntityBeans) is illegal.

> Or it process all the business methods from the pool like servlets
> doGet, and doPost methods ?

No its not like a servlet.  Its more like a singel threaded servlet with a
pool.

>
> If it creates thousand of such bean objects to process thousand users
> requests
> at a time, then what happens when we declare class variables in the bean.
> Does EJB allows to declare class level variables ?

See section 18 of the EJB 1.1 spec.  Class variables are allowed if
read-only.

Dave Wolf
Internet Applications Division
Sybase

>
> Thanks in advance,
> Naveen.
>
>
===========================================================================
> 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