Skip navigation links
Red Hat JBoss Enterprise Application Platform 7.4.0.GA

Package org.hibernate.bytecode

This package defines the API for plugging in bytecode libraries for usage by Hibernate.

See: Description

Package org.hibernate.bytecode Description

This package defines the API for plugging in bytecode libraries for usage by Hibernate. Hibernate uses these bytecode libraries in three scenarios:

  1. Reflection optimization - to speed up the performance of POJO entity and component construction and field/property access
  2. Proxy generation - runtime building of proxies used for deferred loading of lazy entities
  3. Field-level interception - build-time instrumentation of entity classes for the purpose of intercepting field-level access (read/write) for both lazy loading and dirty tracking.

Note that for field-level interception, simply plugging in a new BytecodeProvider is not enough for Hibernate to be able to recognize new providers. You would additionally need to make appropriate code changes to the org.hibernate.intercept.Helper class. This is because the detection of these enhanced classes is needed in a static environment (i.e. outside the scope of any SessionFactory.

Note that in the current form the ability to specify a different bytecode provider is actually considered a global settings (global to the JVM).

Skip navigation links
Red Hat JBoss Enterprise Application Platform 7.4.0.GA

Copyright © 2021 JBoss by Red Hat. All rights reserved.