OK, thanks! You know, you could just take what you
have written right here, and place that in the documentation.
Just a simple quick description of what one has to
do, all in one place, is enough for most people.

thanks again,
Bonnie MacKellar

-----Original Message-----
From: Thomas Mahler
To: OJB Users List
Sent: 6/5/03 2:36 PM
Subject: [FAQ] Re: optimistic locking question

Hi Bonnie,

Bonnie MacKellar wrote:
> Forgive me, I know this is a really basic question, but...
> I just finished reading how to set up  optimistic locking.
> I gather that I need to set this explicitly for each class,
> and that each table needs to have a dedicated column
> for this purpose (timestamp or integer). Is this correct?

correct.
It's very simple:
1. you need a dedicated column of type INTEGER or TIMESTAMP
2. you need a (possibly private) attribute in your java class 
corresponding to the column.
3. in repository.xml you need a field-descriptor for this attribute.
    this field-descriptor must specify locking="true"

> Is there anything written on optimistic locking besides
> the info found in
> http://db.apache.org/ojb/repository.html#field-descriptor?

Not yet. It's on my to do list.
But it'

> thanks,
> Bonnie MacKellar
> software engineer
> Mobius Management Systems, Inc.
> [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to