James Sutherland wrote:If you are using EclipseLink, you can use a sequence connection pool...
James Sutherland wrote:Also use a large sequence pre-allocation size.
James Sutherland wrote:For a sequence connection pool you don't need another persistence unit. You do need a non-JTA data-source, but most servers allow you to use the same connection pool for JTA and non-JTA.
James Sutherland wrote:For the pre-allocation, a bigger size is recommend if you do lost of inserts. Note that for IDENTITY sequencing the id must be selected on every insert, so your ratio of 1:50 would be 50:50 for IDENTITY, TABLE sequencing is much more efficient.
James Sutherland wrote:Not sure why you would be worried about losing 50 sequence numbers on a restart?
James Sutherland wrote:For a sequence connection pool you don't need another persistence unit. You do need a non-JTA data-source, but most servers allow you to use the same connection pool for JTA and non-JTA.
Per Lindberg wrote:
Aha, ok. So in the example below, I just have to change non-transactional-connections from "false" to "true", and that's it?
James Sutherland wrote:Yes, you should configure a sequence connection pool that uses a non-JTA DataSource.
It's feeding time! Give me the food you were going to give to this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|