openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben short" <jamin.sh...@gmail.com>
Subject SELECT followed by UPDATE
Date Fri, 02 Nov 2007 12:41:33 GMT
I am seeing odd behaviour with my application. I do a bunch of query's
in a transaction and get the expected results. But looking at the logs
I see that my selects are followed by a bunch of update statements,
that are updating the records I have just selected. I'm defiantly not
doing any updating.

Has anyone else see this happen? Im using openjpa 1.1.0-SNAPSHOT

Here's a section of my log file.

1331016  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 19293074 SELECT t0.mId,
t0.mName FROM Node t0 ORDER BY t0.mId ASC
1331016  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331031  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 29945396 SELECT t0.mId,
t0.discriminator, t0.mName, t2.mUnit FROM ObservationType t0 LEFT
OUTER JOIN CompositeObservationType t1 ON t0.mId = t1.mId LEFT OUTER
JOIN MeasurementObservationType t2 ON t0.mId = t2.mId WHERE (t0.mName
= ?) [params=(String) CPU]
1331031  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331031  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 5048611 SELECT t1.mId,
t1.discriminator, t1.mName, t3.mUnit FROM
CompositeObservationType_ObservationType t0 INNER JOIN ObservationType
t1 ON t0.mObservationTypes_mId = t1.mId LEFT OUTER JOIN
CompositeObservationType t2 ON t1.mId = t2.mId LEFT OUTER JOIN
MeasurementObservationType t3 ON t1.mId = t3.mId WHERE
t0.CompositeObservationType_mId = ? [params=(int) 8]
1331031  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331031  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 15567682 SELECT t0.id,
t0.discriminator, t1.mId, t1.mName, t2.mId, t2.discriminator,
t2.mName, t4.mUnit, t0.mRecordedTime, t6.mValue FROM Observation t0
LEFT OUTER JOIN Node t1 ON t0.mNode_mId = t1.mId LEFT OUTER JOIN
ObservationType t2 ON t0.mObservationType_mId = t2.mId LEFT OUTER JOIN
CompositeObservation t5 ON t0.id = t5.id LEFT OUTER JOIN
MeasurementObservation t6 ON t0.id = t6.id LEFT OUTER JOIN
CompositeObservationType t3 ON t2.mId = t3.mId LEFT OUTER JOIN
MeasurementObservationType t4 ON t2.mId = t4.mId WHERE (t0.mNode_mId =
? AND t0.mObservationType_mId = ?) ORDER BY t0.mRecordedTime DESC
LIMIT ? [params=(int) 1, (int) 8, (long) 1]
1331063  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [32 ms] spent
1331063  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 21124831 SELECT t1.id,
t1.discriminator, t2.mId, t2.mName, t3.mId, t3.discriminator,
t3.mName, t5.mUnit, t1.mRecordedTime, t7.mValue FROM
CompositeObservation_Observation t0 INNER JOIN Observation t1 ON
t0.mObservations_id = t1.id LEFT OUTER JOIN Node t2 ON t1.mNode_mId =
t2.mId LEFT OUTER JOIN ObservationType t3 ON t1.mObservationType_mId =
t3.mId LEFT OUTER JOIN CompositeObservation t6 ON t1.id = t6.id LEFT
OUTER JOIN MeasurementObservation t7 ON t1.id = t7.id LEFT OUTER JOIN
CompositeObservationType t4 ON t3.mId = t4.mId LEFT OUTER JOIN
MeasurementObservationType t5 ON t3.mId = t5.mId WHERE
t0.CompositeObservation_id = ? [params=(long) 20694]
1331078  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [15 ms] spent
1331078  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 919445 SELECT t0.mId,
t0.discriminator, t0.mName, t2.mUnit FROM ObservationType t0 LEFT
OUTER JOIN CompositeObservationType t1 ON t0.mId = t1.mId LEFT OUTER
JOIN MeasurementObservationType t2 ON t0.mId = t2.mId WHERE (t0.mName
= ?) [params=(String) CPU]
4
1331078  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331078  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 5390241 SELECT t0.id,
t0.discriminator, t1.mId, t1.mName, t2.mId, t2.discriminator,
t2.mName, t4.mUnit, t0.mRecordedTime, t6.mValue FROM Observation t0
LEFT OUTER JOIN Node t1 ON t0.mNode_mId = t1.mId LEFT OUTER JOIN
ObservationType t2 ON t0.mObservationType_mId = t2.mId LEFT OUTER JOIN
CompositeObservation t5 ON t0.id = t5.id LEFT OUTER JOIN
MeasurementObservation t6 ON t0.id = t6.id LEFT OUTER JOIN
CompositeObservationType t3 ON t2.mId = t3.mId LEFT OUTER JOIN
MeasurementObservationType t4 ON t2.mId = t4.mId WHERE (t0.mNode_mId =
? AND t0.mObservationType_mId = ?) ORDER BY t0.mRecordedTime DESC
LIMIT ? [params=(int) 2, (int) 8, (long) 1]
1331094  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [16 ms] spent
1331094  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 19376273 SELECT t1.id,
t1.discriminator, t2.mId, t2.mName, t3.mId, t3.discriminator,
t3.mName, t5.mUnit, t1.mRecordedTime, t7.mValue FROM
CompositeObservation_Observation t0 INNER JOIN Observation t1 ON
t0.mObservations_id = t1.id LEFT OUTER JOIN Node t2 ON t1.mNode_mId =
t2.mId LEFT OUTER JOIN ObservationType t3 ON t1.mObservationType_mId =
t3.mId LEFT OUTER JOIN CompositeObservation t6 ON t1.id = t6.id LEFT
OUTER JOIN MeasurementObservation t7 ON t1.id = t7.id LEFT OUTER JOIN
CompositeObservationType t4 ON t3.mId = t4.mId LEFT OUTER JOIN
MeasurementObservationType t5 ON t3.mId = t5.mId WHERE
t0.CompositeObservation_id = ? [params=(long) 20665]
1331094  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
4
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 1407365 UPDATE Observation
SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId = ? WHERE
id = ? [params=(Timestamp) 2007-11-02 12:12:59.0, (int) 2, (int) 8,
(long) 20665]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 14848295 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
0.0, (long) 20664]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 10986548 UPDATE
ObservationType SET mName = ? WHERE mId = ? [params=(String) idle,
(int) 7]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 881692 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
0.0, (long) 20666]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 21094514 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:43.0, (int) 1,
(int) 7, (long) 20695]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 32932074 UPDATE
ObservationType SET mName = ? WHERE mId = ? [params=(String) wait,
(int) 6]
1331109  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 9018963 UPDATE Observation
SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId = ? WHERE
id = ? [params=(Timestamp) 2007-11-02 12:12:59.0, (int) 2, (int) 7,
(long) 20668]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 16351584 UPDATE
ObservationType SET mName = ? WHERE mId = ? [params=(String) user,
(int) 9]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 10276436 UPDATE Node SET
mName = ? WHERE mId = ? [params=(String) Node 1, (int) 1]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 11412609 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:59.0, (int) 2,
(int) 5, (long) 20664]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 14591755 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:43.0, (int) 1,
(int) 8, (long) 20694]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 27839181 UPDATE Node SET
mName = ? WHERE mId = ? [params=(String) Pres 1, (int) 2]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 10123092 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:43.0, (int) 1,
(int) 9, (long) 20697]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 17846274 UPDATE
ObservationType SET mName = ? WHERE mId = ? [params=(String) sys,
(int) 5]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 32823232 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
100.0, (long) 20668]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 25214945 UPDATE
MeasurementObservationType SET mUnit = ? WHERE mId = ?
[params=(String) %, (int) 6]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 28663548 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:59.0, (int) 2,
(int) 9, (long) 20667]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 7282791 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
0.0, (long) 20698]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 28857253 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:59.0, (int) 2,
(int) 6, (long) 20666]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 8099147 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
0.0, (long) 20697]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 25589601 UPDATE
MeasurementObservationType SET mUnit = ? WHERE mId = ?
[params=(String) %, (int) 5]
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331125  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 17273465 UPDATE
ObservationType SET mName = ? WHERE mId = ? [params=(String) CPU,
(int) 8]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 2180988 UPDATE
MeasurementObservationType SET mUnit = ? WHERE mId = ?
[params=(String) %, (int) 9]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 14438982 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:43.0, (int) 1,
(int) 5, (long) 20696]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 10320726 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
1.0, (long) 20696]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 17591095 UPDATE
Observation SET mRecordedTime = ?, mNode_mId = ?, mObservationType_mId
= ? WHERE id = ? [params=(Timestamp) 2007-11-02 12:12:43.0, (int) 1,
(int) 6, (long) 20698]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 5444480 UPDATE
MeasurementObservationType SET mUnit = ? WHERE mId = ?
[params=(String) %, (int) 7]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 2443802 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
0.0, (long) 20667]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> executing prepstmnt 2371746 UPDATE
MeasurementObservation SET mValue = ? WHERE id = ? [params=(double)
99.0, (long) 20695]
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.SQL - <t
29233217, conn 9695615> [0 ms] spent
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.JDBC - <t
29233217, conn 9695615> [0 ms] commit
1331141  openjpa  TRACE  [http-8080-Processor3] openjpa.jdbc.JDBC - <t
29233217, conn 9695615> [0 ms] close

Mime
View raw message