Features of Hibernate 5

Features of Hibernate 5

Support for Wildfly.
OSGi - The OSGi stands for Open Services Gateway initiative, which is an specification for dynamic, modularized system. Hibernate 5 supports OSGi which provides the capability of installing, activating, deactivating, and uninstalling during runtime, without requiring a system restart.
It provides the support for Java 8 Date and Time API. For this we need to add  hibernate-java8.jar.
The bytecode enhancement mechanism is redesigned. There are three main aspects which we can enhance with bytecode instrumentation:

  • 1 Lazy initialization: Fields can be declared as LAZY and they will be fetched only when being accessed for the first time.
  • 2 Dirty checking: Entities are enhanced so that they can keep track of all the properties that get changed after being loaded in a Persistence Context.
  • 3 Bidirectional associations: It's possible to synchronize both sides of a bidirectional association automatically, even if the developer only updates a single side.

Hibernate's native APIs (Session, etc) have been updated to use generic types. No need to cast when fetching entities.
Second-level cache by reference. This feature enables direct storage of entity references into the second level cache for immutable entities.

SHARE

About Unknown

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment