Skip to content

Commit

Permalink
Make Hibernate / Micrometer integration run after schema creation
Browse files Browse the repository at this point in the history
This is done to ensure that the use of Metrics does not force the
creation of EntityManagerFactory before extensions like
Liquibase or Flyway have had the chance to update the database
schema.

Fixes: quarkusio#39145
(cherry picked from commit e6d1cd2)
  • Loading branch information
geoand authored and gsmet committed Mar 15, 2024
1 parent ad27754 commit f49e59e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Optional;

import io.quarkus.agroal.spi.JdbcDataSourceSchemaReadyBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.BuildSteps;
Expand All @@ -28,6 +29,7 @@ public final class HibernateOrmMetricsProcessor {
public void metrics(HibernateOrmConfig config,
HibernateMetricsRecorder metricsRecorder,
List<PersistenceProviderSetUpBuildItem> persistenceUnitsStarted,
List<JdbcDataSourceSchemaReadyBuildItem> jdbcDataSourceSchemaReadyBuildItems,
Optional<MetricsCapabilityBuildItem> metricsConfiguration,
BuildProducer<MetricsFactoryConsumerBuildItem> datasourceMetrics) {

Expand Down

0 comments on commit f49e59e

Please sign in to comment.