Repository: quarkusio/quarkus
Issue: Hibernate post-boot schema-validation fails after upgrade to Quarkus 2.6.3

### Describe the bug

After upgrade to 2.6.3.Final, post boot schema validation emits some warnings about missing table(s).
Migrations are managed by Flyway and database contains:
1. schema _postboot1_ holds Flyway schema history table
2. schema _postboot_ contains table _product_

Flyway is configured to use _postboot1_ as its own schema and _postboot_ as managed schema.
Hibernate is configured to use _postboot_ as default schema.
A single PanacheEntity _@Entity_ is mapped as:

```
@Entity
@Table(name="product")
class Product extends PanacheEntity {
  // properties
}
```

### Expected behavior

No warnings at all (as before the upgrade)

### Actual behavior

```
2022-02-04 16:26:25,945 ERROR [io.qua.hib.orm.run.sch.SchemaManagementIntegrator] (Hibernate post-boot validation thread for <default>) Failed to validate Schema: Schema-validation: missing table [product]
2022-02-04 16:26:25,992 ERROR [io.qua.hib.orm.run.sch.SchemaManagementIntegrator] (Hibernate post-boot validation thread for <default>) The following SQL may resolve the database issues, as generated by the Hibernate schema migration tool. WARNING: You must manually verify this SQL is correct, this is a best effort guess, do not copy/paste it without verifying that it does what you expect.

create table product (id bigint not null, code varchar(255), marketArea varchar(255), primary key (id));

```


### How to Reproduce?

https://github.com/luca-bassoricci/hibernate-postboot-validator
Repo is configured to use version 2.7.0 of Quarkus

### Output of `uname -a` or `ver`

Link to repo with sample 

### Output of `java -version`

Link to repo with sample 

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.6.3.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)

### Additional information

_No response_

Changed files:
extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/schema/SchemaManagementIntegrator.java

diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/schema/SchemaManagementIntegrator.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/schema/SchemaManagementIntegrator.java
index aed4b79b258..a6c5918dd53 100644
--- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/schema/SchemaManagementIntegrator.java
+++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/schema/SchemaManagementIntegrator.java
@@ -3,14 +3,15 @@
 import java.io.StringWriter;
 import java.util.Collections;
 import java.util.EnumSet;
-import java.util.HashMap;
 import java.util.IdentityHashMap;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.hibernate.boot.Metadata;
+import org.hibernate.engine.config.spi.ConfigurationService;
 import org.hibernate.engine.spi.SessionFactoryImplementor;
 import org.hibernate.integrator.spi.Integrator;
+import org.hibernate.service.ServiceRegistry;
 import org.hibernate.service.spi.SessionFactoryServiceRegistry;
 import org.hibernate.tool.schema.SourceType;
 import org.hibernate.tool.schema.TargetType;
@@ -71,9 +72,9 @@ static String defaultName(SessionFactoryImplementor sf) {
         if (name != null) {
             return name;
         }
-        Object prop = sf.getProperties().get("hibernate.ejb.persistenceUnitName");
-        if (prop != null) {
-            return prop.toString();
+        Object persistenceUnitName = sf.getProperties().get("hibernate.ejb.persistenceUnitName");
+        if (persistenceUnitName != null) {
+            return persistenceUnitName.toString();
         }
         return DataSourceUtil.DEFAULT_DATASOURCE_NAME;
     }
@@ -91,24 +92,24 @@ public static void recreateDatabase(String name) {
         if (!LaunchMode.current().isDevOrTest()) {
             throw new IllegalStateException("Can only be used in dev or test mode");
         }
-        Holder val = metadataMap.get(name);
+        Holder holder = metadataMap.get(name);
 
-        Object prop = val.sessionFactory.getProperties().get("javax.persistence.schema-generation.database.action");
-        if (prop != null && !(prop.toString().equals("none"))) {
+        ServiceRegistry serviceRegistry = holder.sessionFactory.getServiceRegistry();
+        SimpleExecutionOptions executionOptions = new SimpleExecutionOptions(serviceRegistry);
+        Object schemaGenerationDatabaseAction = executionOptions.getConfigurationValues()
+                .get("javax.persistence.schema-generation.database.action");
+        if (schemaGenerationDatabaseAction != null && !(schemaGenerationDatabaseAction.toString().equals("none"))) {
             //if this is none we assume another framework is doing this (e.g. flyway)
-            SchemaManagementTool schemaManagementTool = val.sessionFactory.getServiceRegistry()
+            SchemaManagementTool schemaManagementTool = serviceRegistry
                     .getService(SchemaManagementTool.class);
-            SchemaDropper schemaDropper = schemaManagementTool.getSchemaDropper(new HashMap());
-            schemaDropper
-                    .doDrop(val.metadata, new SimpleExecutionOptions(), new SimpleSourceDescriptor(),
-                            new SimpleTargetDescriptor());
-            schemaManagementTool.getSchemaCreator(new HashMap())
-                    .doCreation(val.metadata, new SimpleExecutionOptions(), new SimpleSourceDescriptor(),
-                            new SimpleTargetDescriptor());
+            SchemaDropper schemaDropper = schemaManagementTool.getSchemaDropper(executionOptions.getConfigurationValues());
+            schemaDropper.doDrop(holder.metadata, executionOptions, new SimpleSourceDescriptor(), new SimpleTargetDescriptor());
+            schemaManagementTool.getSchemaCreator(executionOptions.getConfigurationValues())
+                    .doCreation(holder.metadata, executionOptions, new SimpleSourceDescriptor(), new SimpleTargetDescriptor());
         }
         //we still clear caches though
-        val.sessionFactory.getCache().evictAll();
-        val.sessionFactory.getCache().evictQueries();
+        holder.sessionFactory.getCache().evictAll();
+        holder.sessionFactory.getCache().evictQueries();
     }
 
     public static void runPostBootValidation(String name) {
@@ -123,17 +124,19 @@ public static void runPostBootValidation(String name) {
             }
 
             //if this is none we assume another framework is doing this (e.g. flyway)
-            SchemaManagementTool schemaManagementTool = val.sessionFactory.getServiceRegistry()
+            ServiceRegistry serviceRegistry = val.sessionFactory.getServiceRegistry();
+            SchemaManagementTool schemaManagementTool = serviceRegistry
                     .getService(SchemaManagementTool.class);
-            SchemaValidator validator = schemaManagementTool.getSchemaValidator(new HashMap());
+            SimpleExecutionOptions executionOptions = new SimpleExecutionOptions(serviceRegistry);
+            SchemaValidator validator = schemaManagementTool.getSchemaValidator(executionOptions.getConfigurationValues());
             try {
-                validator.doValidation(val.metadata, new SimpleExecutionOptions());
+                validator.doValidation(val.metadata, executionOptions);
             } catch (SchemaManagementException e) {
                 log.error("Failed to validate Schema: " + e.getMessage());
-                SchemaMigrator migrator = schemaManagementTool.getSchemaMigrator(new HashMap());
+                SchemaMigrator migrator = schemaManagementTool.getSchemaMigrator(executionOptions.getConfigurationValues());
 
                 StringWriter writer = new StringWriter();
-                migrator.doMigration(val.metadata, new SimpleExecutionOptions(), new TargetDescriptor() {
+                migrator.doMigration(val.metadata, executionOptions, new TargetDescriptor() {
                     @Override
                     public EnumSet<TargetType> getTargetTypes() {
                         return EnumSet.of(TargetType.SCRIPT);
@@ -186,9 +189,15 @@ static class Holder {
     }
 
     private static class SimpleExecutionOptions implements ExecutionOptions {
+        private final Map<?, ?> configurationValues;
+
+        public SimpleExecutionOptions(ServiceRegistry serviceRegistry) {
+            configurationValues = serviceRegistry.getService(ConfigurationService.class).getSettings();
+        }
+
         @Override
-        public Map getConfigurationValues() {
-            return Collections.emptyMap();
+        public Map<?, ?> getConfigurationValues() {
+            return configurationValues;
         }
 
         @Override