Cross post from the orm group but I figure you guys might know.
I’m seeing timeout errors from locked queries. How can I get hibernate to use NO LOCK on all reads to the database?
Cross post from the orm group but I figure you guys might know.
I’m seeing timeout errors from locked queries. How can I get hibernate to use NO LOCK on all reads to the database?
Aaron,
You have to use a custom hibernate.xml config.
Here is what would go in the hibernate.xml file.
<?xml version='1.0' encoding='utf-8'?>1
The connection.isolation level is what does it.
In your orm settings in your application.cfc you would add something like this.
ormconfig=expandpath("…/www/config/hibernate.xml")
Thanks,
Curt
Thanks!
How can I verify that the isolation level has been set to 1 other than see if I continue getting the error messages?
If you are using MSSQL you can see it with the profiler.
Curt
Cool. Thanks for the help.