The second candidate release for Hibernate ORM 5.0. CR2 was required because of a bug in how class-loading
worked in certain managed JPA environments. The details can be found in HHH-9887. The main changes
since CR1 include:
Hibernate Search sends the indexing requests in the post transaction phase.
The JMS backend can now send its indexing requests transactionally with the database changes.
Why is that useful? Read on.
Today let’s discuss the interaction between multitenancy and the current session feature.
Multitenancy let’s you isolate Session operations between different tenants.
This is useful to create a single application isolating different customers from one another.
The current session feature returns the same session for a given context, typically a (JTA) transaction.
This facilitates the one session per view/transaction/conversation pattern and avoids the one session per operation anti-pattern.
When creating a bug report for any project within the Hibernate family, it’s extremely helpful (and, frankly, required)
to have an adequate test case available. This is obviously important to make reproducing the issue as easy as possible.
But it’s also vital longer-term. Nearly every bug fix should include a regression test, which is frequently based on the
original reproducer (sometimes, it’s the reproducer, verbatim).
To help create useful test cases, we’re opening up a repo with various templates. Please see the READMEs in each
project’s subdir for more info: Hibernate Test Case Templates
As a starting point, the repo contains two templates for ORM: