The container assumes that a Stateless Session Bean is, well, stateless.
This means that each of the bean's method is stateless, and that the member
variables that the stateless methods use are also stateless.  As long as you
abide by this, you should not have to worry about multithreading!

>From what you described, your collection of worksteps is  stateless.  Hence
you should have nothing to worry about!

Gene

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Perry Hoekstra
Sent: Monday, July 17, 2000 1:20 PM
To: [EMAIL PROTECTED]
Subject: Re: Multi-Threaded Protection within a SSB


James Cook wrote:
>
> How are your helper methods defined. If they are simply methods in your
> bean, or classes that are instantiated in your bean, then all is OK.
>
> If they are some kind of singleton object in your bean, then you have to
> handle concurrency.
>
> Remember, only one client thread can be in a stateless session bean
instance
> at any one time. Matter of fact, the same is true for stateful session
> beans, and entity beans.
>

Reading section 6.8:

Because all instances of a stateless session bean are equivalent, the
container can choose to delegate a
client-invoked method to any available instance. This means, for
example, that the Container may delegate
the requests from the same client within the same transaction to
different instances, and that the
Container may interleave requests from multiple transactions to the same
instance.

What drew my concern was the "the Container may interleave requests from
multiple transactions to the same instance".  If the vendor implements a
single instance of a SSB (to limit resource overhead) and manages the
interleaving of requests to that bean, how is access to the shared
resource (my collection of worksteps) handled.


--
Perry Hoekstra
Consultant
Talent Software Solutions
[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".

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