Hello,

It is really essential to write lock object before modyfing it? There is a 
litttle problem with that. Suppose we are modyfing an object. This object 
have got list of little subobjects that holds names in different languages. 
We get properties from http request and fill the object in (new name objects 
are created and added to the object). Then we invoke some method on the main 
object to check if it is filled properly. We discover that for example name 
of the object wasn't set for some essential language, we display warning 
error and tell user to reenter data. 

And at this point the only reasonable way to force ojb not to save these name 
objects is to rollback transaction. What if we want do pessimistic offline 
lock? We loose lock for a moment. And what is bad too we can't do method in 
application's service layer such as insertSomeObject() which would do 
makePersist because makePersist is made before lock which is made before 
modyfiing object instead we have to do call makePersistent then lock and if 
we want our model to be OJB independent we call insertObject afret that if we 
would in future swap data mapper implementation into JBDC or something  else

Łukasz Korzybski.

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

Reply via email to