DATAJPA-38 - Introduced MergingPersistenceUnitManager.
This commit is contained in:
@@ -708,4 +708,28 @@ public interface UserRepository extends JpaRepository<User, Long> {
|
||||
thus allow seemless tracking of the auditor.</para>
|
||||
</simplesect>
|
||||
</section>
|
||||
|
||||
<section id="jpa.misc">
|
||||
<title>Miscellaneous</title>
|
||||
|
||||
<section>
|
||||
<title>Merging persistence units</title>
|
||||
|
||||
<para>Spring supports ahving multiple persistence units out of the box.
|
||||
But sometimes you might wanna modularize your application but make sure
|
||||
that all these module run inside a single persistence unit at runtime.
|
||||
To do so Spring Data JPA offers a PersistenceUnitManager implementation
|
||||
that automatically merges persistence units based on their name.</para>
|
||||
|
||||
<example>
|
||||
<title>Using MergingPersistenceUnitmanager</title>
|
||||
|
||||
<para><programlisting language="xml"><bean class="….LocalContainerEntityManagerFactoryBean">
|
||||
<property name="persistenceUnitManager">
|
||||
<bean class="….MergingPersistenceUnitManager" />
|
||||
</property
|
||||
</bean></programlisting></para>
|
||||
</example>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
Reference in New Issue
Block a user