camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hekon...@apache.org
Subject git commit: [CAMEL-7126] Added some Javadoc.
Date Wed, 15 Jan 2014 20:25:52 GMT
Updated Branches:
  refs/heads/master fdcaa9d18 -> da80476dd


[CAMEL-7126] Added some Javadoc.


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

Branch: refs/heads/master
Commit: da80476dda0a1862dedff29a7b8c6c6babf4b010
Parents: fdcaa9d
Author: Henryk Konsek <hekonsek@gmail.com>
Authored: Wed Jan 15 21:25:33 2014 +0100
Committer: Henryk Konsek <hekonsek@gmail.com>
Committed: Wed Jan 15 21:25:33 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/bam/EntityManagers.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/da80476d/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagers.java
----------------------------------------------------------------------
diff --git a/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagers.java b/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagers.java
index 6043a77..e34db2b 100644
--- a/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagers.java
+++ b/components/camel-bam/src/main/java/org/apache/camel/bam/EntityManagers.java
@@ -22,11 +22,22 @@ import javax.persistence.EntityManagerFactory;
 import org.springframework.orm.jpa.EntityManagerHolder;
 import org.springframework.transaction.support.TransactionSynchronizationManager;
 
+/**
+ * Utility class designed to orchestrate JPA {@link javax.persistence.EntityManager} and
Spring transactions.
+ */
 public final class EntityManagers {
 
     private EntityManagers() {
     }
 
+    /**
+     * Fetches {@link javax.persistence.EntityManager} bound to the current Spring transaction
or creates new manager.
+     *
+     * @param entityManagerFactory {@link javax.persistence.EntityManagerFactory} used either
as a key for a Spring
+     *                             transaction resource lookup or as a factory to create
new
+     *                             {@link javax.persistence.EntityManager}.
+     * @return {@link javax.persistence.EntityManager} bound to the existing Spring transaction
or new manager instance.
+     */
     public static EntityManager resolveEntityManager(EntityManagerFactory entityManagerFactory)
{
         EntityManagerHolder entityManagerHolder =
                 (EntityManagerHolder) TransactionSynchronizationManager.getResource(entityManagerFactory);


Mime
View raw message