Skip to content

Commit 33fca4e

Browse files
committed
Fix and polish Javadoc for JpaTransactionManager
1 parent adc7ad7 commit 33fca4e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@
8282
* this instance needs to be aware of the DataSource ({@link #setDataSource}).
8383
* The given DataSource should obviously match the one used by the given
8484
* EntityManagerFactory. This transaction manager will autodetect the DataSource
85-
* used as known connection factory of the EntityManagerFactory, so you usually
85+
* used as the connection factory of the EntityManagerFactory, so you usually
8686
* don't need to explicitly specify the "dataSource" property.
8787
*
8888
* <p>This transaction manager supports nested transactions via JDBC 3.0 Savepoints.
89-
* The {@link #setNestedTransactionAllowed} "nestedTransactionAllowed"} flag defaults
90-
* to "false", though, as nested transactions will just apply to the JDBC Connection,
91-
* not to the JPA EntityManager and its cached entity objects and related context.
92-
* You can manually set the flag to "true" if you want to use nested transactions
93-
* for JDBC access code which participates in JPA transactions (provided that your
94-
* JDBC driver supports Savepoints). <i>Note that JPA itself does not support
89+
* The {@link #setNestedTransactionAllowed "nestedTransactionAllowed"} flag defaults
90+
* to {@code false} though, since nested transactions will just apply to the JDBC
91+
* Connection, not to the JPA EntityManager and its cached entity objects and related
92+
* context. You can manually set the flag to {@code true} if you want to use nested
93+
* transactions for JDBC access code which participates in JPA transactions (provided
94+
* that your JDBC driver supports Savepoints). <i>Note that JPA itself does not support
9595
* nested transactions! Hence, do not expect JPA access code to semantically
9696
* participate in a nested transaction.</i>
9797
*
@@ -124,7 +124,7 @@ public class JpaTransactionManager extends AbstractPlatformTransactionManager
124124

125125
/**
126126
* Create a new JpaTransactionManager instance.
127-
* A EntityManagerFactory has to be set to be able to use it.
127+
* <p>An EntityManagerFactory has to be set to be able to use it.
128128
* @see #setEntityManagerFactory
129129
*/
130130
public JpaTransactionManager() {
@@ -145,7 +145,7 @@ public JpaTransactionManager(EntityManagerFactory emf) {
145145
/**
146146
* Set the EntityManagerFactory that this instance should manage transactions for.
147147
* <p>Alternatively, specify the persistence unit name of the target EntityManagerFactory.
148-
* By default, a default EntityManagerFactory will be retrieved through finding a
148+
* By default, a default EntityManagerFactory will be retrieved by finding a
149149
* single unique bean of type EntityManagerFactory in the containing BeanFactory.
150150
* @see #setPersistenceUnitName
151151
*/
@@ -165,7 +165,7 @@ public EntityManagerFactory getEntityManagerFactory() {
165165
* <p>This is an alternative to specifying the EntityManagerFactory by direct reference,
166166
* resolving it by its persistence unit name instead. If no EntityManagerFactory and
167167
* no persistence unit name have been specified, a default EntityManagerFactory will
168-
* be retrieved through finding a single unique bean of type EntityManagerFactory.
168+
* be retrieved by finding a single unique bean of type EntityManagerFactory.
169169
* @see #setEntityManagerFactory
170170
*/
171171
public void setPersistenceUnitName(String persistenceUnitName) {
@@ -215,7 +215,7 @@ public Map<String, Object> getJpaPropertyMap() {
215215
* Set the JDBC DataSource that this instance should manage transactions for.
216216
* The DataSource should match the one used by the JPA EntityManagerFactory:
217217
* for example, you could specify the same JNDI DataSource for both.
218-
* <p>If the EntityManagerFactory uses a known DataSource as connection factory,
218+
* <p>If the EntityManagerFactory uses a known DataSource as its connection factory,
219219
* the DataSource will be autodetected: You can still explicitly specify the
220220
* DataSource, but you don't need to in this case.
221221
* <p>A transactional JDBC Connection for this DataSource will be provided to

0 commit comments

Comments
 (0)