Best code examples for Hibernate ORM ServiceRegistry class (org.hibernate.service.ServiceRegistry)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ServiceRegistry class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM ServiceRegistry examples from Open Source projects
This code example shows how to use the following methods: getService
This code example shows how to use the following methods: getService
		return newJDBCReader( settings, revengStrategy, mdd, serviceRegistry);
	} 
 
	public static JDBCReader newJDBCReader(Settings settings, ReverseEngineeringStrategy revengStrategy, MetaDataDialect mdd,
			ServiceRegistry serviceRegistry) {
		JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
		return new JDBCReader( mdd, jdbcServices.getConnectionProvider(), jdbcServices.getSqlExceptionHelper()
				.getSqlExceptionConverter(), settings.getDefaultCatalogName(), settings.getDefaultSchemaName(), revengStrategy );
	} 
 
	public static MetaDataDialect newMetaDataDialect(Dialect dialect, Properties cfg) {
		return new MetaDataDialectFactory().createMetaDataDialect(dialect, cfg);		
		 
	} 
	 
} 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getService
			throw new ServiceException( "Could not initialize custom PersisterClassResolver impl [" + customImplClass.getName() + "]", e );
		} 
	} 
 
	private Class<? extends PersisterClassResolver> locate(ServiceRegistryImplementor registry, String className) {
		return registry.getService( ClassLoaderService.class ).classForName( className );
	} 
} 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getService
			throw new ServiceException( "Could not initialize custom PersisterFactory impl [" + customImplClass.getName() + "]", e );
		} 
	} 
 
	private Class<? extends PersisterFactory> locate(ServiceRegistryImplementor registry, String className) {
		return registry.getService( ClassLoaderService.class ).classForName( className );
	} 
} 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getService
	public TransactionFactory initiateService(Map configurationValues, ServiceRegistryImplementor registry) { 
		final Object strategy = configurationValues.get( Environment.TRANSACTION_STRATEGY ); 
		if ( TransactionFactory.class.isInstance( strategy ) ) { 
			return (TransactionFactory) strategy; 
		} 
 
		if ( strategy == null ) { 
            LOG.usingDefaultTransactionStrategy(); 
			return new JdbcTransactionFactory(); 
		} 
 
		final String strategyClassName = mapLegacyNames( strategy.toString() ); 
        LOG.transactionStrategy(strategyClassName); 
 
		ClassLoaderService classLoaderService = registry.getService( ClassLoaderService.class ); 
		try { 
			return (TransactionFactory) classLoaderService.classForName( strategyClassName ).newInstance(); 
		} 
		catch ( Exception e ) { 
			throw new HibernateException( "Unable to instantiate specified TransactionFactory class [" + strategyClassName + "]", e ); 
Full Snippet Info
4
CodeRank