HHH-11253 Make Byte Buddy BytecodeProvider impl the default
This commit is contained in:
parent
a77c4081f7
commit
0f5c3a0abc
|
@ -387,8 +387,8 @@ Enable lazy loading feature in runtime bytecode enhancement. This way, even basi
|
||||||
`*hibernate.enhancer.enableAssociationManagement*` (e.g. `true` or `false` (default value))::
|
`*hibernate.enhancer.enableAssociationManagement*` (e.g. `true` or `false` (default value))::
|
||||||
Enable association management feature in runtime bytecode enhancement which automatically synchronizes a bidirectional association when only one side is changed.
|
Enable association management feature in runtime bytecode enhancement which automatically synchronizes a bidirectional association when only one side is changed.
|
||||||
|
|
||||||
`*hibernate.bytecode.provider*` (e.g. `javassist` (default value))::
|
`*hibernate.bytecode.provider*` (e.g. `bytebuddy` (default value))::
|
||||||
The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/bytecode/spi/BytecodeProvider.html[`BytecodeProvider`] built-in implementation flavor. Currently, only `javassist` is supported.
|
The https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/bytecode/spi/BytecodeProvider.html[`BytecodeProvider`] built-in implementation flavor. Currently, only `bytebuddy` and `javassist` are valid values.
|
||||||
|
|
||||||
`*hibernate.bytecode.use_reflection_optimizer*` (e.g. `true` or `false` (default value))::
|
`*hibernate.bytecode.use_reflection_optimizer*` (e.g. `true` or `false` (default value))::
|
||||||
Should we use reflection optimization? The reflection optimizer implements the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/bytecode/spi/ReflectionOptimizer.html[`ReflectionOptimizer`] interface and improves entity instantiation and property getter/setter calls.
|
Should we use reflection optimization? The reflection optimizer implements the https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/bytecode/spi/ReflectionOptimizer.html[`ReflectionOptimizer`] interface and improves entity instantiation and property getter/setter calls.
|
||||||
|
|
|
@ -37,9 +37,10 @@ dependencies {
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
compile( libraries.jpa )
|
compile( libraries.jpa )
|
||||||
compile( libraries.javassist )
|
// Not wanting a transitive dependency on javassist anymore as it's not the default anymore:
|
||||||
// provided until 6.0 when we make it the default and drop Javassist support
|
provided( libraries.javassist )
|
||||||
provided( libraries.byteBuddy )
|
// Could be made optional?
|
||||||
|
compile( libraries.byteBuddy )
|
||||||
compile( libraries.antlr )
|
compile( libraries.antlr )
|
||||||
compile( libraries.jta )
|
compile( libraries.jta )
|
||||||
compile( libraries.jandex )
|
compile( libraries.jandex )
|
||||||
|
|
|
@ -1123,6 +1123,9 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
||||||
String CHECK_NULLABILITY = "hibernate.check_nullability";
|
String CHECK_NULLABILITY = "hibernate.check_nullability";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pick which bytecode enhancing library to use. Currently supports javassist and bytebuddy, bytebuddy being the default since version 5.3.
|
||||||
|
*/
|
||||||
String BYTECODE_PROVIDER = "hibernate.bytecode.provider";
|
String BYTECODE_PROVIDER = "hibernate.bytecode.provider";
|
||||||
|
|
||||||
String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";
|
String JPAQL_STRICT_COMPLIANCE= "hibernate.query.jpaql_strict_compliance";
|
||||||
|
|
|
@ -317,7 +317,7 @@ public final class Environment implements AvailableSettings {
|
||||||
|
|
||||||
public static final String BYTECODE_PROVIDER_NAME_JAVASSIST = "javassist";
|
public static final String BYTECODE_PROVIDER_NAME_JAVASSIST = "javassist";
|
||||||
public static final String BYTECODE_PROVIDER_NAME_BYTEBUDDY = "bytebuddy";
|
public static final String BYTECODE_PROVIDER_NAME_BYTEBUDDY = "bytebuddy";
|
||||||
public static final String BYTECODE_PROVIDER_NAME_DEFAULT = BYTECODE_PROVIDER_NAME_JAVASSIST;
|
public static final String BYTECODE_PROVIDER_NAME_DEFAULT = BYTECODE_PROVIDER_NAME_BYTEBUDDY;
|
||||||
|
|
||||||
public static BytecodeProvider buildBytecodeProvider(Properties properties) {
|
public static BytecodeProvider buildBytecodeProvider(Properties properties) {
|
||||||
String provider = ConfigurationHelper.getString( BYTECODE_PROVIDER, properties, BYTECODE_PROVIDER_NAME_DEFAULT );
|
String provider = ConfigurationHelper.getString( BYTECODE_PROVIDER, properties, BYTECODE_PROVIDER_NAME_DEFAULT );
|
||||||
|
|
|
@ -8,7 +8,6 @@ dependencies {
|
||||||
compile( libraries.dom4j )
|
compile( libraries.dom4j )
|
||||||
compile( libraries.commons_annotations )
|
compile( libraries.commons_annotations )
|
||||||
compile( libraries.jpa )
|
compile( libraries.jpa )
|
||||||
compile( libraries.javassist )
|
|
||||||
compile( libraries.byteBuddy )
|
compile( libraries.byteBuddy )
|
||||||
compile( libraries.jta )
|
compile( libraries.jta )
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ description = 'Hibernate\'s entity version (audit/history) support'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile( project( ':hibernate-core' ) )
|
compile( project( ':hibernate-core' ) )
|
||||||
|
//Ideally javassist should be only an optional dependency but it's currently required by Envers: see HHH-12327
|
||||||
|
compile( libraries.javassist )
|
||||||
|
|
||||||
provided( [group: 'org.hibernate', name: 'hibernate-tools', version: '3.2.0.ga'] )
|
provided( [group: 'org.hibernate', name: 'hibernate-tools', version: '3.2.0.ga'] )
|
||||||
provided( libraries.ant )
|
provided( libraries.ant )
|
||||||
|
@ -19,7 +21,6 @@ dependencies {
|
||||||
|
|
||||||
testCompile( project( ':hibernate-testing' ) )
|
testCompile( project( ':hibernate-testing' ) )
|
||||||
testCompile( project( path: ':hibernate-core', configuration: 'tests' ) )
|
testCompile( project( path: ':hibernate-core', configuration: 'tests' ) )
|
||||||
testRuntime( libraries.javassist )
|
|
||||||
testRuntime( libraries.byteBuddy )
|
testRuntime( libraries.byteBuddy )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,6 @@ dependencies {
|
||||||
testRuntime( libraries.expression_language )
|
testRuntime( libraries.expression_language )
|
||||||
|
|
||||||
testRuntime('jaxen:jaxen:1.1')
|
testRuntime('jaxen:jaxen:1.1')
|
||||||
testRuntime(libraries.javassist)
|
|
||||||
testRuntime(libraries.byteBuddy)
|
testRuntime(libraries.byteBuddy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ dependencies {
|
||||||
compile( libraries.byteman )
|
compile( libraries.byteman )
|
||||||
compile( libraries.byteman_install )
|
compile( libraries.byteman_install )
|
||||||
compile( libraries.byteman_bmunit )
|
compile( libraries.byteman_bmunit )
|
||||||
|
compile( libraries.javassist )
|
||||||
compile( libraries.xapool )
|
compile( libraries.xapool )
|
||||||
compile( libraries.log4j )
|
compile( libraries.log4j )
|
||||||
compile ( libraries.jboss_jta ) {
|
compile ( libraries.jboss_jta ) {
|
||||||
|
|
Loading…
Reference in New Issue