If Hibernate is used as the ORM tool and DB2 as the database in Hibernate we can define Isolation levels and DB2 has its own isolation levels. What is the benefit that we get by defining the isolation levels in hibernate vs using the database isolation levels?
Best How To :
Hibernate acts as an abstraction layer across databases; it would be preferable to use Hibernate's isolation level if you wanted to specify the same isolation levels for multiple supported databases (to the extent that the databases support that isolation level; for instance, Oracle won't implement uncommitted reads).
Hibernate can specify an isolation level for individual queries by appending a WITH clause. That will take precedence over DB2's default for isolation level. So you can pick an isolation level for the database, then allow tweaking the level for individual queries generated by Hibernate.