Catalfano Anthony wrote:
>
> Is there a recommended pattern for locking an entity bean?

The pattern for CMP is: "choose an EJB server that allows configuration of
locking strategies - pessimistic or optimistic - such that your requirements
can be met".

If you are using BMP, use "select ... holdlock ..." or "select ... for update"
etc. depending on your database.

> A usage scenario might be something like the following: There is an 'Order'
> entity bean that has a collection of LineItems. There is a store that
> submits a monthly order to our site. The monthly order is updated by many
> different store personnel but we must ensure that only one user updates the
> Order at a time. I believe that locking is not addressed by the 2.0 spec.
>
> Thanks
>
> Anthony Catalfano
> Information Technology Analyst
> Deere & Company
> 309-748-5201
>
> ===========================================================================
> 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".

--
________________________________________________________________________________

Evan Ireland              Sybase EAServer Engineering        [EMAIL PROTECTED]
                            Wellington, New Zealand               +64 4 934-5856

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