[
https://issues.apache.org/jira/browse/OPENJPA-2449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814387#comment-13814387
]
ASF subversion and git services commented on OPENJPA-2449:
----------------------------------------------------------
Commit 1539188 from [~jpaheath] in branch 'openjpa/branches/2.1.x'
[ https://svn.apache.org/r1539188 ]
OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock -
applied to 2.1.x Albert Lee's patch.
> refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock
> --------------------------------------------------------------
>
> Key: OPENJPA-2449
> URL: https://issues.apache.org/jira/browse/OPENJPA-2449
> Project: OpenJPA
> Issue Type: Improvement
> Components: jdbc, kernel
> Affects Versions: 2.1.2, 2.2.1.1, 2.2.3, 2.3.1, 2.4.0
> Reporter: Albert Lee
> Assignee: Heath Thomann
> Priority: Minor
> Attachments: OPENJPA-2449.patch
>
>
> Simple refresh(PESSIMISTIC_WRITE) generates multiple SQL statements. E.g.
> em.refresh(t1, LockModeType.PESSIMISTIC_WRITE);
> //SELECT t0.CMLT_FOLDER_CONTEXT_UPDATE_TMS, t0.CRE_TIME FROM T1 t0 WHERE
> t0.c1 = ? [params=(String) c1]
> //SELECT t0.c1 FROM T1 t0 WHERE t0.c1 = ? FOR READ ONLY WITH RR USE AND
> KEEP UPDATE LOCKS [params=(String) c1]
> It would be nice if a single SQL is executed to optimize SQL execution and
> chances that another thread may compete to lock the same row.
--
This message was sent by Atlassian JIRA
(v6.1#6144)