-
1. Re: stopping ejbStore when no mods with cmp2
obdobion Oct 4, 2002 5:43 PM (in response to dward2)isModified() was the preferred pattern in the previous releases. But the abstract setters in 2.0 prohibit this technique.
In another thread I noticed that ejbStore is called regardless of the attributes being changed. The comment was that this could be looked at if it presented an efficiency problem. Maybe ejbStore shouldn't be called even if it is fast. Or maybe there should be some boolean that can be checked that is true if any persistent field is modified since last loaded or saved.
Or perhaps there is an entirely new mechanism that is recommended for version stamping rows in the database.
Would someone who has made this work or worked around it please respond. Does anyone know how this is accomplished in other servers? -
2. Re: stopping ejbStore when no mods with cmp2
aloubyansky Oct 7, 2002 4:07 AM (in response to dward2)AFAIK, current implementation will always call ejbStore. But sql update statement will be executed only in case if some field is "dirty", i.e. changed. If there are no dirty fields it just returns.
It doesn't help you, though. Optimistic locking is planned in near future. -
3. Re: stopping ejbStore when no mods with cmp2
aloubyansky Oct 7, 2002 4:08 AM (in response to dward2)AFAIK, current implementation will always call ejbStore. But sql update statement will be executed only in case if some field is "dirty", i.e. changed. If there are no dirty fields it just returns.
It doesn't help you, though. Optimistic locking is planned in near future.