Hi all,
We have an application with a huge volume of concurrent inserts and out of a sudden performance started to degrade on certain scenarios (which are still not that clear).
Anyways, after taking a thread dump on the WebSphere instance the application is running and analysing it on ISA we noticed that there were many (monitor) locks on an instance monitor of the class SequenceHiLoGenerator. As we had the source code for Hibernate we went to check where could this synchronized block and noticed that it was on generate. Strangely we shouldn't be using SequenceHiLoGenerator since all our classes had allocationSize=1 on its @SequenceGenerator annotation (as pointed by this rejected bug:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-354).
Sincerely I searched a lot on our copy of Hibernate source for the version we are using and I could not find any points where it checked if the entity was annotated with @SequenceGenerator and its allocationSize =1. We had a look at AnnotationBinder class and also on IdentifierGeneratorFactory (not to mention a few greps all over).
Are we using a Hibernate or Annotations version that did not had this trick? Could anyone point us (please and for curiosity only) where in Hibernate code is the code for this selection on hilo or regular sequence?
It is already stated on the subject but we are using Hibernate 3.2 GA and Annotations 3.3.1.GA.
Best regards,
Rafael Ribeiro