Spring Framework SmartPersistenceUnitInfo - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework SmartPersistenceUnitInfo class.

This code example shows how to use the following methods:setPersistenceProviderPackageName
		this.persistenceUnitInfo = determinePersistenceUnitInfo(managerToUse); 
		JpaVendorAdapter jpaVendorAdapter = getJpaVendorAdapter(); 
		if (jpaVendorAdapter != null && this.persistenceUnitInfo instanceof SmartPersistenceUnitInfo) { 
			((SmartPersistenceUnitInfo) this.persistenceUnitInfo).setPersistenceProviderPackageName( 
		PersistenceProvider provider = getPersistenceProvider(); 
		if (provider == null) { 
			String providerClassName = this.persistenceUnitInfo.getPersistenceProviderClassName(); 
			if (providerClassName == null) { 
				throw new IllegalArgumentException( 
						"No PersistenceProvider specified in EntityManagerFactory configuration, " + 
						"and chosen PersistenceUnitInfo does not specify a provider class name either"); 
			Class<?> providerClass = ClassUtils.resolveClassName(providerClassName, getBeanClassLoader()); 
			provider = (PersistenceProvider) BeanUtils.instantiateClass(providerClass); 
Experience pair programming with AI  Get Codota for Java
See Code Examples for Spring Framework SmartPersistenceUnitInfo Methods: