I have a web application implemented in JSF and JPA. In the UI, the users can updated a bunch of different entities before choosing to "save" the entire operation. During the save operation, if two users were crossing data, one of them is going to get an optimistic lock exception, which is all fine and dandy. However, I want to be able to tell which specific entity caused the Optimistic Lock exception while handling the exception in order to show a marker on the proper row in the UI. Using eclipselink, in the catch block for the optimisitc lock exception, is there a way to identify the entity which caused the optimistic lock exception?
Determine Which Entity Caused an Optimistic Lock Exception
2.5k Views Asked by lscoughlin At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in JPA
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- How to create nested selects with sql?
- Play Framework Unable to build entity manager factory when Working with PostGIS
- Getting entity with a join table GAE
- Is it necessary to create an repository and a service for each entity?
- JPA, Hibernate can I do composite primary key which one element is foreign kay @OneToMany?
- Hibernate Search Faceting not working
- EntityManagerSetupException for multiple joins and a sub query for NamedQuery
- JPA and web app
- JPA findDistinctPropertyBy magic method doesn't work as expected when using spring-boot-starter-jpa
- Inject EntityManager in SwitchYard Junit implementation
- QueryDSL where relationship may be null
- JPA, how can i have two queries, one use lazy and one use eager for fetching?
- Duplicate entry '[X]' for key '[Y]' on JPA repository 'save' operation. Saved entity has its key defined already
- Hibernate's bidirectional OneToOne relationship not working within the same class
Related Questions in ECLIPSELINK
- EntityManagerSetupException for multiple joins and a sub query for NamedQuery
- Bidirectional relationships in JPA
- JPA 2.0 CriteriaQuery with predicate on type being a class or any subclass of
- EclipseLink @Multitenant EntityManager/Transaction handling
- use like for integer value in namedquery Eclipselink
- spring boot eclipse link security exception
- JPA Bidirectionnal Uknown column
- Generate model classes from Firebird database
- set Oracle Current Timestamp to JPA entity
- EclipseLink -Derby Embedded not start with the application
- eclipselink metamodel with gradle and groovy
- How do I resolve mssql resetting connections
- javax.validation.ConstraintViolationException: Bean Validation constraint(s) violated while executing Automatic Bean Validation on event:'prePersist'
- Eclipselink EntityManager returning different instance for same entity
- Create advanced search in JPA through user defined dynamic where clause conditions
Related Questions in OPTIMISTIC-LOCKING
- Hibernate increments version on both sides of many to many association
- Optimistic locking and re-try
- RESTful optimistic locking in Restangular
- Optimistic lock in Doctrine2 doesn't work for many to many relation
- Optimistic Locking doesn't work - no version increment, no exception
- Hibernate: lockMode for criteria is not working
- Increment version column on update
- JSF/JPA/EJB Best practice for locking an entity from the "Edit" page
- javax.persistence.version causes the Id of an entity to remain null in the transaction
- Version property of Parent isn't incrementing if I update child
- simple design question about optimistic locking in spring/jpa/hibernate
- simple optimistic lock question in jpa/spring/hibernate
- Hibernate OptimisticLockingFailureException not throwing when it's supposed to
- OptimisticLockException - Sql Server - Handle
- Using ETag for optimistic locking in a Django REST application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The JPA OptimisticLockException has a getEntity() method that returns the object that caused the lock error. EclipseLink's OptimisticLockException which is the caused by of the JPA exception also has a getObject() method.