camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Watts (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-7053) JPA Skip locked entities
Date Tue, 10 Dec 2013 03:24:23 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chris Watts updated CAMEL-7053:
-------------------------------

    Attachment: skipLockedJpa.patch

Patch to add functionality including test case

> JPA Skip locked entities
> ------------------------
>
>                 Key: CAMEL-7053
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7053
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-jpa
>    Affects Versions: 2.12.1
>            Reporter: Chris Watts
>         Attachments: skipLockedJpa.patch
>
>
> The current implementation of the JPA endpoint is catered more for using it as a queue
for one JVM.
> This change performs the lock with timeout=0, causing a NOWAIT to be used where implementations
support it.
> Ideally the lock should be performed using refresh() instead of lock() to prevent dirty
read exceptions but Hibernate's implementation throws the wrong exception.
> https://hibernate.atlassian.net/browse/HHH-8786
> Currently OpenJPA throws the wrong exception for both lock and refresh so the test uses
hibernate. See this jira:
> https://issues.apache.org/jira/browse/OPENJPA-2461
> The default lock of WRITE=OPTIMISTIC_FORCE_INCREMENT performs the lock too late and their
are various jpa implementation problems  (OpenJPA doesn't lock it in memory, hibernate performs
the delete before the increment). In nearly every use case PESSIMISTIC_WRITE is more correct.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message