Hibernate ORM ClassLoaderServiceImpl - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ClassLoaderServiceImpl class.

This code example shows how to use the following methods:
		s.close();
	} 
 
	@Test
	public void testMultipleAnalyzerDiscriminatorDefinitions() { 
		SearchConfigurationFromHibernateCore searchConfig = new SearchConfigurationFromHibernateCore(
				getCfg(), 
				new ClassLoaderServiceImpl() // ORM internal class. Should be ok for testing (HF)
		); 
		ReflectionManager reflectionManager = searchConfig.getReflectionManager();
		XClass xclass = reflectionManager.toXClass( BlogEntry.class );
		ConfigContext context = new ConfigContext( searchConfig, new BuildContextForTest( searchConfig ) );
		MetadataProvider metadataProvider = new AnnotationMetadataProvider(
				searchConfig.getReflectionManager(),
				context
		); 
 
		try { 
			metadataProvider.getTypeMetadataFor( reflectionManager.toClass( xclass ) );
			fail(); 
6
CodeRank
This code example shows how to use the following methods:
		} 
	} 
 
	private ServiceRegistryImplementor getServiceRegistry(Map<String, ?> cfg) {
		ServiceRegistryImplementor serviceRegistry = mock( ServiceRegistryImplementor.class );
		when( serviceRegistry.getService( ClassLoaderService.class ) ).thenReturn( new ClassLoaderServiceImpl() );
 
		OptionsServiceImpl optionsService = new OptionsServiceImpl();
		optionsService.injectServices( serviceRegistry );
		optionsService.configure( cfg );
		when( serviceRegistry.getService( OptionsService.class ) ).thenReturn( optionsService );
 
		return serviceRegistry;
	} 
} 
4
CodeRank