Tis the season to Hibernate after all

Hibernate Core 4.0 released

Chris Mayer

Rotten to the core, certainly not! Multi-tenancy support and introduction of ServiceRegistry API the main draws for Hibernate 4

Just about making the last delivery before Christmas, the Hibernate team have announced with glee that the final version of their ORM Framework Hibernate Core 4.0 is now available, promising a whole list of major improvements.

The JBoss popular persistence engine, that maps Java classes to databases primarily, has always been known for pushing the envelope further in terms of innovation. Originally the team planned to implement a redesign of the Hibernate metamodel (org.hibernate.mapping) but instead opted to bolster Hibernate Core 4 with a host of enhancements such as adding multi-tenancy support and a new service management system called SystemRegistry.

Through Hibernate Core, developers can now create multi-tenancies through three methods, as detailed in Steve Ebersole’s blog post.

  1. Separate database instances – This approach gives each tenant their own physical database instance.
  2. Separate schemas – This approach uses the same physical database instance for all the tenants, but each gets its own schema (or catalog) within that instance.
  3. Partitioning – This approach uses the same database instance and same schema. In other words a single table holds the data for every tenant. The tenants are partitioned by some form of discriminator value.

For those slightly hesistant over the methods, the team provided a helpful Q&A to iron out any multi-tenancy design issues.

Another brand new features is the ServiceRegistry API, a fundamental shift in how Hibernate builds and manages services. From now on, services are managed in a hierarchical registries making things much more cohesive. Improved Logging in with i18n support and message codes have also been implemented in the full release. Work has also begun to make a much clearer split between API, SPI and implementation classes.

The Hibernate team have also been in full spring cleaning mode (a tad bit early), cleaning out unneccessary deprecated classes and methods.

But what does the future hold for Hibernate Core? The team also announced simultaneously the release of 3.6.9 but they say that 4.1 should be out in the new year, complete with a new API for performing natural key lockups and an improved cascade performance. Not to mention the tidying up of Documentation paperwork, currently laying in four pieces – Getting Started Guide, Reference Documentation, Developers Guide and EntityManager User Guide. The artifacts for Core 4 are available in the JBoss repository 

Inline Feedbacks
View all comments