org.hibernate.engine.config.internal.ConfigurationServiceInitiator Java Examples
The following examples show how to use
org.hibernate.engine.config.internal.ConfigurationServiceInitiator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactiveServiceInitiators.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 4 votes |
private static List<StandardServiceInitiator> buildInitialServiceInitiatorList() { final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>(); // Definitely exclusive to Hibernate Reactive, as it marks the registry as Reactive: serviceInitiators.add( ReactiveMarkerServiceInitiator.INSTANCE ); // Exclusive to Hibernate Reactive: serviceInitiators.add( VertxInstanceInitiator.INSTANCE ); // Exclusive to Hibernate Reactive: serviceInitiators.add( SqlClientPoolInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( ReactiveSessionFactoryBuilderInitiator.INSTANCE ); serviceInitiators.add( BytecodeProviderInitiator.INSTANCE ); serviceInitiators.add( ProxyFactoryFactoryInitiator.INSTANCE ); serviceInitiators.add( CfgXmlAccessServiceInitiator.INSTANCE ); serviceInitiators.add( ConfigurationServiceInitiator.INSTANCE ); serviceInitiators.add( PropertyAccessStrategyResolverInitiator.INSTANCE ); serviceInitiators.add( ImportSqlCommandExtractorInitiator.INSTANCE ); serviceInitiators.add( SchemaManagementToolInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( NoJdbcEnvironmentInitiator.INSTANCE ); serviceInitiators.add( JndiServiceInitiator.INSTANCE ); serviceInitiators.add( JmxServiceInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( ReactivePersisterClassResolverInitiator.INSTANCE ); serviceInitiators.add( PersisterFactoryInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( NoJdbcConnectionProviderInitiator.INSTANCE ); serviceInitiators.add( MultiTenantConnectionProviderInitiator.INSTANCE ); serviceInitiators.add( DialectResolverInitiator.INSTANCE ); serviceInitiators.add( DialectFactoryInitiator.INSTANCE ); serviceInitiators.add( BatchBuilderInitiator.INSTANCE ); serviceInitiators.add( JdbcServicesInitiator.INSTANCE ); serviceInitiators.add( RefCursorSupportInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( ReactiveQueryTranslatorFactoryInitiator.INSTANCE ); //Custom for Hibernate Reactive: serviceInitiators.add( ReactiveIdentifierGeneratorFactoryInitiator.INSTANCE); //Custom for Hibernate Reactive: serviceInitiators.add( NoJtaPlatformInitiator.INSTANCE ); serviceInitiators.add( SessionFactoryServiceRegistryFactoryInitiator.INSTANCE ); serviceInitiators.add( RegionFactoryInitiator.INSTANCE ); serviceInitiators.add( TransactionCoordinatorBuilderInitiator.INSTANCE ); serviceInitiators.add( ManagedBeanRegistryInitiator.INSTANCE ); serviceInitiators.add( EntityCopyObserverFactoryInitiator.INSTANCE ); serviceInitiators.trimToSize(); return Collections.unmodifiableList( serviceInitiators ); }
Example #2
Source File: PreconfiguredServiceRegistryBuilder.java From quarkus with Apache License 2.0 | 4 votes |
/** * Modified copy from * org.hibernate.service.StandardServiceInitiators#buildStandardServiceInitiatorList * * N.B. not to be confused with * org.hibernate.service.internal.StandardSessionFactoryServiceInitiators#buildStandardServiceInitiatorList() * * @return */ private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(RecordedState rs) { final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>(); //Enforces no bytecode enhancement will happen at runtime: serviceInitiators.add(DisabledBytecodeProviderInitiator.INSTANCE); //Use a custom ProxyFactoryFactory which is able to use the class definitions we already created: serviceInitiators.add(new QuarkusRuntimeProxyFactoryFactoryInitiator(rs)); // Replaces org.hibernate.boot.cfgxml.internal.CfgXmlAccessServiceInitiator : // not used // (Original disabled) serviceInitiators.add(CfgXmlAccessServiceInitiatorQuarkus.INSTANCE); // Useful as-is serviceInitiators.add(ConfigurationServiceInitiator.INSTANCE); // TODO (optional): assume entities are already enhanced? serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE); // TODO (optional): not a priority serviceInitiators.add(ImportSqlCommandExtractorInitiator.INSTANCE); // TODO disable? serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE); // Replaces JdbcEnvironmentInitiator.INSTANCE : serviceInitiators.add(new QuarkusJdbcEnvironmentInitiator(rs.getDialect())); // Custom one! serviceInitiators.add(QuarkusJndiServiceInitiator.INSTANCE); // Custom one! serviceInitiators.add(DisabledJMXInitiator.INSTANCE); serviceInitiators.add(PersisterClassResolverInitiator.INSTANCE); serviceInitiators.add(PersisterFactoryInitiator.INSTANCE); // Custom one! serviceInitiators.add(QuarkusConnectionProviderInitiator.INSTANCE); serviceInitiators.add(MultiTenantConnectionProviderInitiator.INSTANCE); // Disabled: Dialect is injected explicitly // serviceInitiators.add( DialectResolverInitiator.INSTANCE ); // Disabled: Dialect is injected explicitly // serviceInitiators.add( DialectFactoryInitiator.INSTANCE ); serviceInitiators.add(BatchBuilderInitiator.INSTANCE); serviceInitiators.add(JdbcServicesInitiator.INSTANCE); serviceInitiators.add(RefCursorSupportInitiator.INSTANCE); serviceInitiators.add(QueryTranslatorFactoryInitiator.INSTANCE); // Disabled: IdentifierGenerators are no longer initiated after Metadata was generated. // serviceInitiators.add(MutableIdentifierGeneratorFactoryInitiator.INSTANCE); serviceInitiators.add(new QuarkusJtaPlatformInitiator(true)); serviceInitiators.add(SessionFactoryServiceRegistryFactoryInitiator.INSTANCE); // Replaces RegionFactoryInitiator.INSTANCE serviceInitiators.add(QuarkusRegionFactoryInitiator.INSTANCE); serviceInitiators.add(TransactionCoordinatorBuilderInitiator.INSTANCE); serviceInitiators.add(ManagedBeanRegistryInitiator.INSTANCE); serviceInitiators.add(EntityCopyObserverFactoryInitiator.INSTANCE); serviceInitiators.trimToSize(); return serviceInitiators; }
Example #3
Source File: PreconfiguredReactiveServiceRegistryBuilder.java From quarkus with Apache License 2.0 | 4 votes |
/** * Modified copy from * org.hibernate.service.StandardServiceInitiators#buildStandardServiceInitiatorList * * N.B. not to be confused with * org.hibernate.service.internal.StandardSessionFactoryServiceInitiators#buildStandardServiceInitiatorList() * * @return */ private static List<StandardServiceInitiator> buildQuarkusServiceInitiatorList(RecordedState rs) { final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>(); // Definitely exclusive to Hibernate Reactive, as it marks the registry as Reactive: serviceInitiators.add(ReactiveMarkerServiceInitiator.INSTANCE); //Custom for Hibernate Reactive: serviceInitiators.add(ReactiveSessionFactoryBuilderInitiator.INSTANCE); //Enforces no bytecode enhancement will happen at runtime: serviceInitiators.add(DisabledBytecodeProviderInitiator.INSTANCE); //Use a custom ProxyFactoryFactory which is able to use the class definitions we already created: serviceInitiators.add(new QuarkusRuntimeProxyFactoryFactoryInitiator(rs)); // Replaces org.hibernate.boot.cfgxml.internal.CfgXmlAccessServiceInitiator : // not used // (Original disabled) serviceInitiators.add(CfgXmlAccessServiceInitiatorQuarkus.INSTANCE); // Useful as-is serviceInitiators.add(ConfigurationServiceInitiator.INSTANCE); // TODO (optional): assume entities are already enhanced? serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE); // TODO (optional): not a priority serviceInitiators.add(ImportSqlCommandExtractorInitiator.INSTANCE); // TODO disable? serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE); // Replaces JdbcEnvironmentInitiator.INSTANCE : serviceInitiators.add(new QuarkusNoJdbcEnvironmentInitiator(rs.getDialect())); // Custom one! serviceInitiators.add(QuarkusJndiServiceInitiator.INSTANCE); // Custom one! serviceInitiators.add(DisabledJMXInitiator.INSTANCE); //Custom for Hibernate Reactive: serviceInitiators.add(ReactivePersisterClassResolverInitiator.INSTANCE); serviceInitiators.add(PersisterFactoryInitiator.INSTANCE); //Custom for Hibernate Reactive: serviceInitiators.add(NoJdbcConnectionProviderInitiator.INSTANCE); //serviceInitiators.add(QuarkusConnectionProviderInitiator.INSTANCE); serviceInitiators.add(MultiTenantConnectionProviderInitiator.INSTANCE); // Disabled: Dialect is injected explicitly // serviceInitiators.add( DialectResolverInitiator.INSTANCE ); // Disabled: Dialect is injected explicitly // serviceInitiators.add( DialectFactoryInitiator.INSTANCE ); serviceInitiators.add(BatchBuilderInitiator.INSTANCE); serviceInitiators.add(JdbcServicesInitiator.INSTANCE); serviceInitiators.add(RefCursorSupportInitiator.INSTANCE); //serviceInitiators.add(QueryTranslatorFactoryInitiator.INSTANCE); serviceInitiators.add(ReactiveQueryTranslatorFactoryInitiator.INSTANCE); // Disabled: IdentifierGenerators are no longer initiated after Metadata was generated. // serviceInitiators.add(MutableIdentifierGeneratorFactoryInitiator.INSTANCE); serviceInitiators.add(new QuarkusJtaPlatformInitiator(false)); serviceInitiators.add(SessionFactoryServiceRegistryFactoryInitiator.INSTANCE); // Replaces RegionFactoryInitiator.INSTANCE serviceInitiators.add(QuarkusRegionFactoryInitiator.INSTANCE); serviceInitiators.add(TransactionCoordinatorBuilderInitiator.INSTANCE); serviceInitiators.add(ManagedBeanRegistryInitiator.INSTANCE); serviceInitiators.add(EntityCopyObserverFactoryInitiator.INSTANCE); serviceInitiators.add(ReactiveIdentifierGeneratorFactoryInitiator.INSTANCE); serviceInitiators.trimToSize(); return serviceInitiators; }
Example #4
Source File: StandardServiceInitiators.java From lams with GNU General Public License v2.0 | 4 votes |
private static List<StandardServiceInitiator> buildStandardServiceInitiatorList() { final List<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>(); serviceInitiators.add( CfgXmlAccessServiceInitiator.INSTANCE ); serviceInitiators.add( ConfigurationServiceInitiator.INSTANCE ); serviceInitiators.add( PropertyAccessStrategyResolverInitiator.INSTANCE ); serviceInitiators.add( ImportSqlCommandExtractorInitiator.INSTANCE ); serviceInitiators.add( SchemaManagementToolInitiator.INSTANCE ); serviceInitiators.add( JdbcEnvironmentInitiator.INSTANCE ); serviceInitiators.add( JndiServiceInitiator.INSTANCE ); serviceInitiators.add( JmxServiceInitiator.INSTANCE ); serviceInitiators.add( PersisterClassResolverInitiator.INSTANCE ); serviceInitiators.add( PersisterFactoryInitiator.INSTANCE ); serviceInitiators.add( ConnectionProviderInitiator.INSTANCE ); serviceInitiators.add( MultiTenantConnectionProviderInitiator.INSTANCE ); serviceInitiators.add( DialectResolverInitiator.INSTANCE ); serviceInitiators.add( DialectFactoryInitiator.INSTANCE ); serviceInitiators.add( BatchBuilderInitiator.INSTANCE ); serviceInitiators.add( JdbcServicesInitiator.INSTANCE ); serviceInitiators.add( RefCursorSupportInitiator.INSTANCE ); serviceInitiators.add( QueryTranslatorFactoryInitiator.INSTANCE ); serviceInitiators.add( MutableIdentifierGeneratorFactoryInitiator.INSTANCE); serviceInitiators.add( JtaPlatformResolverInitiator.INSTANCE ); serviceInitiators.add( JtaPlatformInitiator.INSTANCE ); serviceInitiators.add( SessionFactoryServiceRegistryFactoryInitiator.INSTANCE ); serviceInitiators.add( RegionFactoryInitiator.INSTANCE ); serviceInitiators.add( TransactionCoordinatorBuilderInitiator.INSTANCE ); serviceInitiators.add( ManagedBeanRegistryInitiator.INSTANCE ); return Collections.unmodifiableList( serviceInitiators ); }
Example #5
Source File: RecordableBootstrap.java From quarkus with Apache License 2.0 | 2 votes |
private static List<StandardServiceInitiator> standardInitiatorList() { final ArrayList<StandardServiceInitiator> serviceInitiators = new ArrayList<StandardServiceInitiator>(); //This one needs to be replaced after Metadata has been recorded: serviceInitiators.add(BootstrapOnlyProxyFactoryFactoryInitiator.INSTANCE); serviceInitiators.add(CfgXmlAccessServiceInitiator.INSTANCE); serviceInitiators.add(ConfigurationServiceInitiator.INSTANCE); serviceInitiators.add(PropertyAccessStrategyResolverInitiator.INSTANCE); serviceInitiators.add(ImportSqlCommandExtractorInitiator.INSTANCE); serviceInitiators.add(SchemaManagementToolInitiator.INSTANCE); serviceInitiators.add(JdbcEnvironmentInitiator.INSTANCE); // Custom one! serviceInitiators.add(QuarkusJndiServiceInitiator.INSTANCE); // Custom one! serviceInitiators.add(DisabledJMXInitiator.INSTANCE); serviceInitiators.add(PersisterClassResolverInitiator.INSTANCE); serviceInitiators.add(PersisterFactoryInitiator.INSTANCE); // Custom one! serviceInitiators.add(QuarkusConnectionProviderInitiator.INSTANCE); serviceInitiators.add(MultiTenantConnectionProviderInitiator.INSTANCE); serviceInitiators.add(DialectResolverInitiator.INSTANCE); // Custom one! serviceInitiators.add(DialectFactoryInitiator.INSTANCE); serviceInitiators.add(BatchBuilderInitiator.INSTANCE); serviceInitiators.add(JdbcServicesInitiator.INSTANCE); serviceInitiators.add(RefCursorSupportInitiator.INSTANCE); serviceInitiators.add(QueryTranslatorFactoryInitiator.INSTANCE); // Custom one! Also, this one has state so can't use the singleton. serviceInitiators.add(new QuarkusMutableIdentifierGeneratorFactoryInitiator());// MutableIdentifierGeneratorFactoryInitiator.INSTANCE); serviceInitiators.add(new QuarkusJtaPlatformInitiator(true)); serviceInitiators.add(SessionFactoryServiceRegistryFactoryInitiator.INSTANCE); serviceInitiators.add(QuarkusRegionFactoryInitiator.INSTANCE); serviceInitiators.add(TransactionCoordinatorBuilderInitiator.INSTANCE); serviceInitiators.add(ManagedBeanRegistryInitiator.INSTANCE); serviceInitiators.add(EntityCopyObserverFactoryInitiator.INSTANCE); serviceInitiators.trimToSize(); return serviceInitiators; }