How to clear the sequence preallocation pool? [message #1702545] |
Thu, 23 July 2015 02:34  |
Eclipse User |
|
|
|
Is there a way in EclipseLink to clear the sequence preallocation pool?
In some automated tests we drop and create our database schema while the application is running. After that we clear the cache:
javax.persistence.Cache.evictAll()
org.eclipse.persistence.jpa.JpaCache.clear()
Everything works fine after that, except that the sequence preallocation pool is not cleared, so we get into problems when a lot of rows are created after that, resulting in primary key constraint errors.
Is there a way to clear this cache? Internally in EclipseLink there is org.eclipse.persistence.internal.sequencing.SequencingManager.resetSequencing() but this is for internal use only.
Or is this a bug and should this have been cleared by clearing the JpaCache?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.50371 seconds