Hi all,
we are using openjpa in two ways:
1) In our Geronimo Applicationserver 2.1.1
2) In our Test-Environment with openejb embedded 3.0
We have a problem in 2), which I described in a posting on the
openejb-Mailinglist:
On Jun 30, 2008, at 7:32 AM, Josef.Eisele@(protected):
> Hi David,
>
> Germany lost the Euro2008 therefore I need good news ;-) Do you have
> any
> for me?
>
> I confinced my team to use all junit-Tests with openejb as embedded
> container in Eclipse :-)
>
> Using my tests, sometimes strange things happen:
> * I test the public CRUD-functions of my business class and often I
> get
> the expected GREEN color as the result.
> * But sometimes the first function of my business class fails. It is a
> creation of the business object. The failure happens without any
> code-change.
>
> There are two SQL-Insert-Statemens which depend on each other. We
> use the
> EntityManager.persist Method. Is it possible the transaction manager
> in
> embedded-openejb sometimes use the wrong order for the insert-
> statements ?
FWIU, yes. By default, OpenJPA does not reorder SQL statements to
respect foreign keys. There is an UpdateManager which will respect
foreign keys, but you have to turn it on with this property:
openjpa
.jdbc
.UpdateManager=
org.apache.openjpa.jdbc.kernel.ConstraintUpdateManagerBTW, this is about the limits of my knowledge of OpenJPA, so you may
be better served by asking on the OpenJPA Users mailing list
(users@(protected)
).
-dain
=> I tried the property, but nothing changed.
-Josef
BGS Beratungsgesellschaft
Software Systemplanung AG Niederlassung Rhein/Main
Robert-Koch-Straße 41
55129 Mainz
Fon: +49 (0) 6131 / 914-0
Fax: +49 (0) 6131 / 914-400
www.bgs-ag.de Geschäftssitz Mainz
Registergericht
Amtsgericht Mainz
HRB 62 50
Aufsichtsratsvorsitzender
Dr. Wolfgang Trommer
Vorstand
Hanspeter Gau
Hermann Kiefer
Nils Manegold
Heinz-Jörg Zimmermann