Background bootstrapping via "bootstrapExecutor" for LocalContainerEntityManagerFactoryBean and LocalSessionFactoryBean/Builder

Issue: SPR-13732
This commit is contained in:
Juergen Hoeller
2015-12-19 15:13:46 +01:00
parent 64bd8b7f34
commit db1171d5c4
6 changed files with 212 additions and 33 deletions

View File

@@ -10,13 +10,13 @@
<context:annotation-config />
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceXmlLocation" value="org/springframework/orm/jpa/domain/persistence-context.xml" />
<property name="dataSource" ref="dataSource" />
<property name="persistenceXmlLocation" value="org/springframework/orm/jpa/domain/persistence-context.xml"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="HSQL" />
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
<property name="database" value="HSQL"/>
<property name="showSql" value="true"/>
<property name="generateDdl" value="true"/>
</bean>
</property>
<property name="jpaPropertyMap">
@@ -25,6 +25,9 @@
<!-- <prop key="hibernate.ejb.use_class_enhancer">true</prop> -->
</props>
</property>
<property name="bootstrapExecutor">
<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor"/>
</property>
</bean>
</beans>