Hi!

> I know that an entity EJB is shared among all client's.
> However what does jboss do internally when it encounters a 1000 clients
> asking for an entity bean with 'PrimaryId=123' for example?
> Do you 'lock' all the 999 clients until only 1 is working with the bean at
a
> time?

Yes. We use an entity cache with pessimistic concurrency control.

> This would probably help me to figure out some proper 'getNextID' method
:)

Note that if you only use an EntityBean to create a generator you will
probably end up with doing one DB call per generated key, which is bad. By
wrapping it in a stateless session bean you can "batch" keys.

/Rickard



Reply via email to