openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Vallender <>
Subject 2 servers creating objects
Date Wed, 25 Feb 2009 18:17:15 GMT


If I have two servers which are both running an OpenJPA program which is
referencing the same database - what's the best way to create an object
which references other objects? E.g. - I have object A - which references
object B and C - and object A1 - which references objects B and C also. If
object A is created on server 1 - then it'll first try to create B & C. If
server 2 creates A - then it will also try to create objects B and C. 
Depending on which server starts creating objects first - B, C could be
created by either server1 or server2. 

Is there anything better than - try to select B - if not there persist it?
IS there a best way to create an object if it doesn't already exist?



View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message