Skip to content

Commit

Permalink
Merge pull request #21065 from Sanne/NewBatching
Browse files Browse the repository at this point in the history
Hibernate ORM: switch to the slightly more optimised UnmodifiableBatchBuilderInitiator
  • Loading branch information
yrodiere authored Oct 29, 2021
2 parents 89d38d4 + ad30a88 commit 36b7827
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
import org.hibernate.boot.registry.selector.internal.StrategySelectorImpl;
import org.hibernate.engine.config.internal.ConfigurationServiceInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.UnmodifiableBatchBuilderInitiator;
import org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator;
import org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator;
import org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator;
Expand Down Expand Up @@ -190,7 +190,9 @@ private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(R
// Custom one: Dialect is injected explicitly
serviceInitiators.add(new QuarkusStaticDialectFactoryInitiator(rs.getDialect()));

serviceInitiators.add(BatchBuilderInitiator.INSTANCE);
// Non-default implementation: optimised for lack of JMX management
serviceInitiators.add(UnmodifiableBatchBuilderInitiator.INSTANCE);

serviceInitiators.add(JdbcServicesInitiator.INSTANCE);
serviceInitiators.add(RefCursorSupportInitiator.INSTANCE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.hibernate.boot.cfgxml.internal.CfgXmlAccessServiceInitiator;
import org.hibernate.boot.registry.StandardServiceInitiator;
import org.hibernate.engine.config.internal.ConfigurationServiceInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.UnmodifiableBatchBuilderInitiator;
import org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator;
import org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator;
import org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator;
Expand Down Expand Up @@ -75,7 +75,9 @@ public List<StandardServiceInitiator> initialInitiatorList() {

// Custom one!
serviceInitiators.add(DialectFactoryInitiator.INSTANCE);
serviceInitiators.add(BatchBuilderInitiator.INSTANCE);

// Non-default implementation: optimised for lack of JMX management
serviceInitiators.add(UnmodifiableBatchBuilderInitiator.INSTANCE);
serviceInitiators.add(JdbcServicesInitiator.INSTANCE);
serviceInitiators.add(RefCursorSupportInitiator.INSTANCE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl;
import org.hibernate.boot.registry.selector.internal.StrategySelectorImpl;
import org.hibernate.engine.config.internal.ConfigurationServiceInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.UnmodifiableBatchBuilderInitiator;
import org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator;
import org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator;
import org.hibernate.engine.jdbc.internal.JdbcServicesInitiator;
Expand Down Expand Up @@ -189,7 +189,8 @@ private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(R
// Disabled: Dialect is injected explicitly
// serviceInitiators.add( DialectFactoryInitiator.INSTANCE );

serviceInitiators.add(BatchBuilderInitiator.INSTANCE);
// Non-default implementation: optimised for lack of JMX management
serviceInitiators.add(UnmodifiableBatchBuilderInitiator.INSTANCE);
serviceInitiators.add(JdbcServicesInitiator.INSTANCE);
serviceInitiators.add(RefCursorSupportInitiator.INSTANCE);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.hibernate.boot.cfgxml.internal.CfgXmlAccessServiceInitiator;
import org.hibernate.boot.registry.StandardServiceInitiator;
import org.hibernate.engine.config.internal.ConfigurationServiceInitiator;
import org.hibernate.engine.jdbc.batch.internal.BatchBuilderInitiator;
import org.hibernate.engine.jdbc.batch.internal.UnmodifiableBatchBuilderInitiator;
import org.hibernate.engine.jdbc.connections.internal.MultiTenantConnectionProviderInitiator;
import org.hibernate.engine.jdbc.cursor.internal.RefCursorSupportInitiator;
import org.hibernate.engine.jdbc.dialect.internal.DialectResolverInitiator;
Expand Down Expand Up @@ -87,7 +87,8 @@ public List<StandardServiceInitiator> initialInitiatorList() {
// Custom Quarkus implementation !
serviceInitiators.add(DialectFactoryInitiator.INSTANCE);

serviceInitiators.add(BatchBuilderInitiator.INSTANCE);
// Non-default implementation: optimised for lack of JMX management
serviceInitiators.add(UnmodifiableBatchBuilderInitiator.INSTANCE);
serviceInitiators.add(JdbcServicesInitiator.INSTANCE);
serviceInitiators.add(RefCursorSupportInitiator.INSTANCE);

Expand Down

0 comments on commit 36b7827

Please sign in to comment.