deltaspike-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject deltaspike git commit: improve @PersistenceUnitName documentation
Date Fri, 12 Feb 2016 09:01:23 GMT
Repository: deltaspike
Updated Branches:
  refs/heads/master c3099bcf6 -> 8d8435177


improve @PersistenceUnitName documentation

mainly added information about how such a PU could be configured


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/8d843517
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/8d843517
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/8d843517

Branch: refs/heads/master
Commit: 8d84351773c6e4a8a30c77c85a5c248da06defdf
Parents: c3099bc
Author: Mark Struberg <struberg@apache.org>
Authored: Fri Feb 12 09:57:09 2016 +0100
Committer: Mark Struberg <struberg@apache.org>
Committed: Fri Feb 12 09:57:09 2016 +0100

----------------------------------------------------------------------
 documentation/src/main/asciidoc/jpa.adoc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/8d843517/documentation/src/main/asciidoc/jpa.adoc
----------------------------------------------------------------------
diff --git a/documentation/src/main/asciidoc/jpa.adoc b/documentation/src/main/asciidoc/jpa.adoc
index d4835ff..8db7349 100644
--- a/documentation/src/main/asciidoc/jpa.adoc
+++ b/documentation/src/main/asciidoc/jpa.adoc
@@ -218,6 +218,10 @@ public class EntityManagerProducer {
 ----
 
 Obtaining an EntityManager from an EntityManagerFactory is just a matter of calling `emfA.createEntityManager()`.
+DeltaSpike provides a built-in producer for `@PersistenceUnitName` qualified EntityManagerFactories.
+This producer also looks up  a property files with the name `persistence-{persistenceunit
name}.properties` via the DeltaSpike `PropertyLoader`.
+For the example above this would be `persistence-puA.properties`.
+The properties in this file will be passed 1:1 to `Persistence#createEntityManagerFactory(properties)`
by the built-in producer method.
 
 ==== Producing Multiple EntityManagers
 There are several ways to make multiple entity managers available for use in `@Transactional`
methods, each suitable for a different situation.


Mime
View raw message