Skip to content

Commit

Permalink
Register the QuarkusImportSqlCommandExtractorInitiator consistently i…
Browse files Browse the repository at this point in the history
…n all boot registries
  • Loading branch information
Sanne committed Aug 24, 2020
1 parent 816c662 commit d6f3082
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import io.quarkus.hibernate.orm.runtime.service.CfgXmlAccessServiceInitiatorQuarkus;
import io.quarkus.hibernate.orm.runtime.service.DisabledJMXInitiator;
import io.quarkus.hibernate.orm.runtime.service.FlatClassLoaderService;
import io.quarkus.hibernate.orm.runtime.service.QuarkusImportSqlCommandExtractorInitiator;
import io.quarkus.hibernate.orm.runtime.service.QuarkusJdbcEnvironmentInitiator;
import io.quarkus.hibernate.orm.runtime.service.QuarkusRegionFactoryInitiator;

Expand Down Expand Up @@ -161,8 +162,8 @@ private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(R
// TODO (optional): assume entities are already enhanced?
serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE);

// TODO (optional): not a priority
serviceInitiators.add(ImportSqlCommandExtractorInitiator.INSTANCE);
// Custom one!
serviceInitiators.add(QuarkusImportSqlCommandExtractorInitiator.INSTANCE);

// TODO disable?
serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public final class StandardHibernateORMInitiatorListProvider implements InitialI

@Override
public List<StandardServiceInitiator> initialInitiatorList() {

// Note to maintainers: always remember to check for consistency needs with both:
// io.quarkus.hibernate.orm.runtime.boot.registry.PreconfiguredServiceRegistryBuilder#buildQuarkusServiceInitiatorList(RecordedState)
// and ReactiveHibernateInitiatorListProvider

final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>();

//This one needs to be replaced after Metadata has been recorded:
Expand All @@ -47,7 +52,9 @@ public List<StandardServiceInitiator> initialInitiatorList() {
serviceInitiators.add(ConfigurationServiceInitiator.INSTANCE);
serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE);

// Custom one!
serviceInitiators.add(QuarkusImportSqlCommandExtractorInitiator.INSTANCE);

serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE);

serviceInitiators.add(JdbcEnvironmentInitiator.INSTANCE);
Expand Down

0 comments on commit d6f3082

Please sign in to comment.