Srinivas,
Is this what you really want to do? Acquiring a lock smiply because of a
query sounds pretty punitive. I would only encourage something like this on
the very smalltest systems in terms of scale, and in that case why EJB at
all?
Why not wait until an update transaction comes in to acually modify the
bean? If you really want a long lock, how about implementing a soft lock
protocol on the bean itself? There is actually quite a bit on this topic in
the archives... Look for "optimistic locking", "timestamps" and related
keywords.
-Chris.
> -----Original Message-----
> From: Srinivas Hasti [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, November 05, 1999 10:52 AM
> To: [EMAIL PROTECTED]
> Subject: Suggestions
>
> Hi,
> I need to design/develop a entity bean which needs
> to do following
> When a client access the ejb using finder method, if
> find is successful, i need to lock the row in
> database. Second client(doing find with same
> primarykey) should wait till first client is done
> before he can start modifying the row.
>
> Any hints/suggestions are helpful.
>
> Thanks
> H
>
> =====
> class JSignature{
> final static String name = "Srinivas Hasti";
> static String email= "[EMAIL PROTECTED]";
> static String ring = "919-484-3026";
> }
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
> ==========================================================================
> =
> 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".
===========================================================================
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".