org.hibernate.bytecode

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » Database ORM » hibernate » org.hibernate.bytecode 
org.hibernate.bytecode

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 conctruction 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.

Currently, both CGLIB and Javassist are supported out-of-the-box.

Note that for field-level interception, simply plugging in a new {@link BytecodeProvider} is not enough for Hibernate to be able to recognize new providers. You would additionally need to make appropriate code changes to the {@link 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 {@link org.hibernate.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).

Java Source File NameTypeComment
AbstractClassTransformerImpl.javaClass Basic implementation of the ClassTransformer contract.
BasicProxyFactory.javaInterface
BytecodeProvider.javaInterface Contract for providers of bytecode services to Hibernate.
ClassTransformer.javaInterface A persistence provider provides an instance of this interface to the PersistenceUnitInfo.addTransformer method. The supplied transformer instance will get called to transform entity class files when they are loaded and redefined.
InstrumentedClassLoader.javaClass A specialized classloader which performs bytecode enhancement on class definitions as they are loaded into the classloader scope.
ProxyFactoryFactory.javaInterface An interface for factories of ProxyFactory proxy factory instances.
ReflectionOptimizer.javaInterface Represents reflection optimization for a particular class.
w_w__w__.j__av__a2___s___._c__o___m___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.