El Jeffo ([EMAIL PROTECTED]) wrote:
> Hi everyone...
>
> I thought there was a way to "synchonize" a session bean such that
> I suppose you could say that only one "user" or "servlet" could
> use it at a time.
>
> Simply put if there's $5 left in the bank, you wouldn't want to have
> a user withdraw $5 with two different web browsers if they hit
> submit at the same time... so we kinda want it to be like there's
> only one teller window, and the servlets have to wait their
> turn.
>
> How to do it kinda escapes me, but let me know if there was
> something I missed.  It would be most appreciated.   No need to write
> volumes of code if you know of a good web site reference for example.
> Just sent the URL, I'll do the reading from there.
>
> Jeff

Access to each session bean instance is serialized, but the spec
doesn't specifically allow you to say there may only be one instance
of a particular session bean class.  Access to entity beans is also
serialized and you can be certain that, in a a given app server
instance (neglecting clustering issues), there's only one instance of a
particular entity bean class + primary key.  It sounds to me like your
talking about something much more like an entity.  You can still get
the guarantee you're looking for if you access the entity through a
session bean, but the guarantee comes from the properties of the
entity bean, not the session bean.

Does that help any?

        Gary


Reply via email to