> As I said before the default LockManager (version) is responsible for
incrementing the version of all children even if the objects are not
modified.

I don't know if that is the case. I know you pointed out before that the
manual states that we don't do exclusing locking, but our resource-local
unit tests show that we are updating the version fields only dirty Entities
(which makes logical sense to me).

I don't belive that you want to be running with the pessimistic lock
manager. (From the user manual)"... the
org.apache.openjpa.jdbc.kernel.PessimisticLockManager , which uses SELECT
FOR UPDATE statements (or the database's equivalent) to lock the database
rows corresponding to locked objects.

> so there has to be a difference between resource-local and JTA handling.
This is where we need to direct our investigation. I can't come up with a
reason that JTA vs resource-local would cause this issue... but I've seen
weirder things before. Perhaps collecting trace from running in the app
server will shed some light on what is going on?

On Thu, Aug 4, 2011 at 9:48 AM, M. Walter <marc.wal...@sbb.ch> wrote:

> Hi Rick,
>
> when I run the application server, entites are loaded and converted to DTOs
> which are serialized and transported to the client via the network. Next
> the
> client changes some values (or one value in this case). Then the DTOs are
> transferred back to the server and converted into JPA entities again. A
> merge is done to persist the changes.
>
> As I said before the default LockManager (version) is responsible for
> incrementing the version of all children even if the objects are not
> modified. (I used this LockManager in my test and only the modified
> object's
> version was touched, so there has to be a difference between resource-local
> and JTA handling.) To increment all childrens' version field is a VERY
> strict behaviour of OpenJPA and in my opinion this makes not sense in every
> case. But how can I switch this off? If I set LockManager to "none" there
> is
> no difference to "version". And "pessimistic" with
> "VersionUpdateOnWriteLock" set to false or none or whatever (not documented
> what value to use to switch it off) didn't help either. So what can I do?
>

-- 
*Rick Curtis*

Reply via email to