Hi/Lo generator has some restrictions
Quote:
Unfortunately, you can't use hilo when supplying your own Connection to Hibernate, or when Hibernate is using an application server datasource to obtain connections enlisted with JTA.
But it is good since it access DB 1/max_lo times.
max_lo is the range size reserved by the generator to increase id
in memory.
If max_lo = 100, and hi value=10000. Generator can generate id from 10000 to 10099 wo requesting DB. If another JVM requests and id value, it will get 10100 as a start value.
I may be +- 1 wrong but the idea is there. You can google hilo algorithm for a better explaination