Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]version 2.1.7:[/b]
I would like to have two implementations of TableHiLoGenerator running in my application. Both id generators access the same SQL Server database, which contains the hibernate_unique_key table. Obviously I don't want both implementations grabbing the same seed value from the hibernate_unique_key table to prevent primary key collisions, so I believe Hibernate's TableHiLoGenerator uses a "select for update" query to lock the table from read access when the seed value is read and updated.
However, the SQLServerDialect doesn't seem to support this, as its supportsForUpdate() method returns false. Does this mean in SQLServer that I cannot lock the table to prevent concurrent access by my two TableHiLoGenerator implementations? What can I do to ensure that my two implementations do not grab the same seed value.