Author: sclassen Date: Tue May 13 06:41:59 2014 New Revision: 1594145 URL: http://svn.apache.org/r1594145 Log: onami-persist: improved java doc
Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerProvider.java onami/sandbox/persist/src/main/java/org/apache/onami/persist/Transactional.java onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnitOfWork.java Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerProvider.java URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerProvider.java?rev=1594145&r1=1594144&r2=1594145&view=diff ============================================================================== --- onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerProvider.java (original) +++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/EntityManagerProvider.java Tue May 13 06:41:59 2014 @@ -26,8 +26,9 @@ import javax.persistence.EntityManager; /** * Provider for {@link EntityManager}. * <p/> - * This class does not implement the {@link Provider} interface because the {@link EntityManager} - * objects do have a life cycle and should therefore not be stored in instance/member variables. + * Even though this class extends the {@link Provider} interface it is not bound as a provider of + * {@link EntityManager}. The reason for this is that the {@link EntityManager} objects do have a + * life cycle and should therefore not be stored in instance/member variables. * <p/> * The {@link UnitOfWork} defines the life cycle of the {@link EntityManager}. An entity manager * will be created when the unit of work is started. It is open and valid for use during the entire Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/Transactional.java URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/Transactional.java?rev=1594145&r1=1594144&r2=1594145&view=diff ============================================================================== --- onami/sandbox/persist/src/main/java/org/apache/onami/persist/Transactional.java (original) +++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/Transactional.java Tue May 13 06:41:59 2014 @@ -38,7 +38,7 @@ import java.lang.annotation.Target; * If a rollback happens for a method which did not start the transaction the already existing * transaction will be marked as rollbackOnly. * <p/> - * Guice uses AOP to enhance a method annotated with @{@link Transactional} with a wrapper. + * Guice uses AOP to enhance a method annotated with {@link Transactional @Transactional} with a wrapper. * This means the {@link Transactional @Transactional} only works as expected when: * <ul> * <li> Modified: onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnitOfWork.java URL: http://svn.apache.org/viewvc/onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnitOfWork.java?rev=1594145&r1=1594144&r2=1594145&view=diff ============================================================================== --- onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnitOfWork.java (original) +++ onami/sandbox/persist/src/main/java/org/apache/onami/persist/UnitOfWork.java Tue May 13 06:41:59 2014 @@ -32,7 +32,7 @@ import javax.persistence.EntityManager; * For applications running in a container the {@link PersistenceFilter} is recommended. * It will start a unit of work for every incoming request and properly close it at the end. * <p/> - * For stand alone application it is recommended to relay on the @{@link Transactional} annotation. + * For stand alone application it is recommended to relay on the {@link Transactional @Transactional} annotation. * The transaction handler will automatically span a unit of work around a transaction. * <p/> * The most likely scenario in which one would want to take manual control over the unit of work @@ -60,7 +60,7 @@ public interface UnitOfWork { /** - * Starts the unit of work. + * Begins the unit of work. * When a unit of work has already been started for the current thread an {@link IllegalStateException} is thrown. * * @throws IllegalStateException if a unit of work is already active for this thread. @@ -69,13 +69,13 @@ public interface UnitOfWork throws IllegalStateException; /** - * @return {@code true} if the unit of work is already running for this thread + * @return {@code true} if the unit of work is active for the current thread * {@code false} otherwise. */ boolean isActive(); /** - * Stops the unit of work. + * Ends the unit of work. * When the unit of work is not active this method will do nothing. */ void end();