At 01:34 PM 22/11/99 +0100, Gustaf Andersson wrote:
>Hi,
>
>I'm involved in a project that uses EJB's. I have an
>entity-bean that can be locked and unlocked from the 
>client's and the probem is this:
>When one client unlockes the bean (using a boolean that is
>not mapped the database) it doesn't seem like the other
>clients use the same boolean, because the boolean they
>uses is still "locked".
>Does someone know where the problem is, or could be? Any suggestions
>are very welcome.

You are not guareenteed to be using the same instance of an object
with entity beans. Why do you want to do this locking anyway? There are
other way of doing this with either the transactional attributes or with
a boolean in the database (so other non-ejb applications can make use of it)

If you really need to do this make the boolean a static variable, this means
there is only one for all instances.


--
Subvert the dominant paradigm
 http://www.cyber4.org/members/grumpy/index.html

Reply via email to