Browse Source

polishing

conversation
Juergen Hoeller 15 years ago
parent
commit
57f90ad4ef
  1. 2
      org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java
  2. 4
      org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java

2
org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java

@ -112,7 +112,7 @@ public abstract class AbstractEntityManagerFactoryBean implements @@ -112,7 +112,7 @@ public abstract class AbstractEntityManagerFactoryBean implements
*/
public void setPersistenceProviderClass(Class<? extends PersistenceProvider> persistenceProviderClass) {
Assert.isAssignable(PersistenceProvider.class, persistenceProviderClass);
this.persistenceProvider = (PersistenceProvider) BeanUtils.instantiateClass(persistenceProviderClass);
this.persistenceProvider = BeanUtils.instantiateClass(persistenceProviderClass);
}
/**

4
org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -208,7 +208,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage @@ -208,7 +208,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage
"No PersistenceProvider specified in EntityManagerFactory configuration, " +
"and chosen PersistenceUnitInfo does not specify a provider class name either");
}
Class providerClass = ClassUtils.resolveClassName(providerClassName, getBeanClassLoader());
Class<?> providerClass = ClassUtils.resolveClassName(providerClassName, getBeanClassLoader());
provider = (PersistenceProvider) BeanUtils.instantiateClass(providerClass);
}
if (provider == null) {

Loading…
Cancel
Save