From 539941befa63b04b6ab616442d01221d1ca2ecb0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Mon, 19 Apr 2021 23:54:50 +0200 Subject: [PATCH] [#16640] Allow setting batch size for Hibernate Reactive --- .../reactive/deployment/HibernateReactiveProcessor.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java b/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java index 3db86d5751bcd..c11efe20d6fe0 100644 --- a/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java +++ b/extensions/hibernate-reactive/deployment/src/main/java/io/quarkus/hibernate/reactive/deployment/HibernateReactiveProcessor.java @@ -272,6 +272,11 @@ private static ParsedPersistenceXmlDescriptor generateReactivePersistenceUnit( desc.getProperties().setProperty(AvailableSettings.DEFAULT_NULL_ORDERING, persistenceUnitConfig.query.defaultNullOrdering.name().toLowerCase()); + // JDBC + persistenceUnitConfig.jdbc.statementBatchSize.ifPresent( + statementBatchSize -> desc.getProperties().setProperty(AvailableSettings.STATEMENT_BATCH_SIZE, + String.valueOf(statementBatchSize))); + // Statistics if (hibernateOrmConfig.metricsEnabled || (hibernateOrmConfig.statistics.isPresent() && hibernateOrmConfig.statistics.get())) {