Hi Anamitra,

> I have a confusion over the ralationship between a client thread, an
> EJBObject and the actual beanImpl instance.
> Lets take the stateless session bean first.
> In the client side I get an objRef for the bean like this:-  Register
> register = registerhome.create();
> Now when I invoke a method on the "register" object, the invocation first
> goes to an EJBObject which
>  in turn fwds the request to an instance of the stateless session bean.
> Q1> Now if I again invoke the another method of the objRef then does the
> invocation goes to the same EJBObject instance everytime??
> OR it goes to a diffrent EJBObject instance??
> The spec says that a client cant assume that the same bean instance will
> service it every time. But can the same EJBObject instace
> service it everytime if the objref used is the same??

Need not, because the bean above is stateless.

> Q2>Now can that "register" objRef be used in multple threads??

The objRef (the register object) is a remote stub. I'm not sure if it has
been stated in the spec, but the objRef need not be thread-safe.

In effect, the association between the objRef and and instance is dynamic,
and is managed by the container.

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

Reply via email to