Is there a guarantee of uniqueness for entity beans?

Alex Chaffee

[ I have looked through the EJB 1.1 spec for a requirement that containers guarantee that entity beans in the ready state are unique (i.e. that there is never more than one instance of a bean with a given primary key value). I cannot find such a guarantee, but I would expect one. Does anyone know if this is indeed the case? ]

There is no such guarantee. The server (or servers) can instantiate as many instances of the same underlying Entity Bean (with the same PK) as it wants. However, each instance is guaranteed to have up-to-date data values, and be transactionally consistent, so uniqueness is not required. This allows the server to scale the system to support multiple threads, multiple concurrent requests, and multiple hosts.