Thanks for the reply Dain.

Yes, I have set the row-locking element for JBossCMP.  However, the problem
I have is that there will be a lot of access to the inventory rows that are just 
checking to 
see if there is still available and don't need a lock.  I would also like it if those 
reads did
not have to wait for some other transaction going on.  Or worse, those reads get an 
error
when their transaction completes because the row changed after they read the value but
before their transaction completed.  I just want to read the current value of the row. 
 It is
unimportant if the row is locked or something has updated it and not committed yet.  
Small
inaccuracies are not important.  The methods that actually update the rows do a safety 
check
after the lock is granted.  So far I can only solve this issue by a direct SQL select 
of the 
data I need.  I don't see any other solution now until JBossCMP supports something 
other
than Required on transactions.

Jon

On Monday 24 June 2002 10:55 am, [EMAIL PROTECTED] wrote:
> Message: 6
> Date: Mon, 24 Jun 2002 12:31:54 -0500
> From: Dain Sundstrom <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Re: JBoss-user digest, Vol 1 #2508 - 10 msgs
> Reply-To: [EMAIL PROTECTED]
>
> I think all you need is database pessimistic locking (SELECT FOR UPDATE)
> which will row lock the inventory item in the database for the length of
> the transaction as soon as it is loaded (finder or ejbLoad).  You can
> turn this on in JBossCMP with the row-locking element and in JAWS I
> think you use the select-for-update element.
>
> -dain


-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to