Kirk Pepperdine wrote:
> From the 1.1 spec it would appear as if the container has the option of
> delegating any method call from a client to any stateless session bean
> that's in its pool.  So each of foo, bar, and baz would run in a different
> stateless session bean.
>
> Does this sound right?

Yes, and that has certainly been my experience, and that was what I
thought as well.

If that's true, which I sure hope it is in all servers, then Marc's
comment (to which I was objecting) that "a client reference to a
stateless session bean...ought to be good for some period of time" is
sort of meaningless, or at least non-informational.  That is, that
reference only needs to be "good" for the life of the method invocation,
which is quite obvious, or else the Java language wouldn't work.  :-)

I actually assumed he was saying something more, and something that
troubled me, viz. that the reference had to be "good" for, say,
something like five minutes, or three hours, or some other
server-dependent timeout value (I believe he mentioned something about
the timeout attribute that you set on the session bean? haven't gotten
there yet) after which point it would no longer be "good", and after
which point your client application might start behaving in
unpredictable ways.  Obviously, since the client application cannot
predict the session timeout value in advance--it could be
milliseconds!--the client app in such a bizarre system would have to be
written assuming that the stateless session bean reference was *never*
good, and would have to be looked up anew each time!  I was desperately
hoping he was wrong, because this would be a crummy way to design (a) a
specification and (b) a server.

And the bit that he writes about "after that time [i.e. the hypothetical
five minutes or three hours] the reference should be cancellable" makes
no sense to me.  What would it mean to cancel a reference to a stateless
session bean?  How would you do this?  What would happen?  How could I
possibly ever write a client application that would work?

The only way in which these comments make sense to me at all is if by
"reference" he actually meant "handle", which as I understand it is a
slightly different beast--i.e. one that you squirrel away somewhere and
resuscitate after many moons.  I am not yet familiar with how these
work; I suppose it is at least sensible to wonder whether that handle
will continue to refer to the bean it once referred to before it was put
to sleep.  On the other hand, my gut reaction tells me that as long as
there's a stateless instance somewhere on the server, then your handle
could point at it, because one stateless session bean is basically the
same as another.

Cheers,
Laird

P. S. I looked out the window of my house this morning in Acton, MA, USA
and noticed that the thermometer read two degrees fahrenheit.  Yow!

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