Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 328714

Summary: support batch writing with optimistic locking
Product: z_Archived Reporter: James Sutherland <jamesssss>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: adrian.goerler, tom.ware
Version: unspecifiedKeywords: performance
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
fixes some issues with batch writing and provides plugable mechanism none

Description James Sutherland CLA 2010-10-26 09:55:11 EDT
we support batch writing with optimistic locking using the JDBC API on Oracle10 and MySQL platforms.  We should default to supporting it for all platforms, as it only uses the JDBC API.  If a platform does not support it, the platform should disable the support, but it should work by default.
Comment 1 James Sutherland CLA 2012-11-20 08:50:05 EST
Created attachment 223751 [details]
fixes some issues with batch writing and provides plugable mechanism
Comment 2 James Sutherland CLA 2012-11-20 09:19:26 EST
Git main push - bug#328714 - support batch writing with optimistic locking

https://bugs.eclipse.org/bugs/show_bug.cgi?id=328714

This patch adds some fixes and enhancements to batch writing to support usage with optimistic locking and allow for a plugable batch mechanism.

Changes:
-	Allow batch writing persistence unit property to take custom mechanism.
-	Provide query hint, "eclipselink.jdbc.batch-writing" to enable/disable batch writing for modify queries.
-	Fixed indirect list/set lazy add to not check contains as can cause issue with classes that incorrectly implement equals.
-	Cached batch flag in database call, allowed batch to be configurable on ModifyQuery.
-	Allowed for batch writing mechanism to be plugable in database platform and accessor.
-	Enabled batch writing support with optimistic locking by default, JDBC and most database support this.
-	Removed incorrect optimistic batch support in MySQL and MaxDB.
-	Added support for NativeSequence to have a TableSequence delegate if the platform does not support the desired type of native sequence.
-	Added test for optimistic locking with batch writing.
-	Added performance test to compare various batch writing mechanisms.
-	Changed native and JPQL modify queries to not batch by default, so correct row-count is returned and query is executed when expected.
Comment 3 Adrian Goerler CLA 2012-11-21 02:05:14 EST
(In reply to comment #0)
> we support batch writing with optimistic locking using the JDBC API on
> Oracle10 and MySQL platforms.  

It is also enabled by default on the SAP MaxDB platform.
Comment 4 James Sutherland CLA 2012-11-26 11:06:34 EST
fixed in 2.5
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:20:38 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink