diff --git a/spring-framework-reference/src/orm.xml b/spring-framework-reference/src/orm.xml index 82793bb8c3b..6259a519273 100644 --- a/spring-framework-reference/src/orm.xml +++ b/spring-framework-reference/src/orm.xml @@ -1814,66 +1814,21 @@ public class ProductDaoImpl implements ProductDao { a non-invasiveness perspective, and might feel more natural to JPA developers. - -
- <interfacename>JpaDialect</interfacename> +
+ Transaction Management - As an advanced feature JpaTemplate, - JpaTransactionManager and subclasses of - AbstractEntityManagerFactoryBean support a custom - JpaDialect, to be passed into the - "jpaDialect" bean property. In such a scenario, the DAOs won't receive an - EntityManagerFactory reference but rather a - full JpaTemplate instance instead (for example, - passed into JpaDaoSupport's "jpaTemplate" - property). A JpaDialect implementation can - enable some advanced features supported by Spring, usually in a - vendor-specific manner: + To execute service operations within transactions, you can use + Spring's common declarative transaction facilities. For example: - - - applying specific transaction semantics (such as custom - isolation level or transaction timeout) - + + You are strongly encouraged to read the + section entitled if you + have not done so to get a more detailed coverage of Spring's + declarative transaction support. + - - retrieving the transactional JDBC - Connection (for exposure to JDBC-based - DAOs) - - - - advanced translation of PersistenceExceptions - to Spring DataAccessExceptions - - - - This is particularly valuable for special transaction semantics and - for advanced translation of exception. Note that the default - implementation used (DefaultJpaDialect) doesn't - provide any special capabilities and if the above features are required, - the appropriate dialect has to be specified. - - See the JpaDialect Javadoc for more - details of its operations and how they are used within Spring's JPA - support. -
- -
- Transaction Management - - To execute service operations within transactions, you can use - Spring's common declarative transaction facilities. For example: - - - You are strongly encouraged to read the - section entitled if you have - not done so to get a more detailed coverage of Spring's declarative - transaction support. - - - <?xml version="1.0" encoding="UTF-8"?> + <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" @@ -1909,15 +1864,61 @@ public class ProductDaoImpl implements ProductDao { </beans> - Spring JPA allows a configured - JpaTransactionManager to expose a JPA transaction - to JDBC access code that accesses the same JDBC - DataSource, provided that the registered - JpaDialect supports retrieval of the - underlying JDBC Connection. Out of the box, - Spring provides dialects for the Toplink, Hibernate and OpenJPA JPA - implementations. See the next section for details on the - JpaDialect mechanism. + Spring JPA allows a configured + JpaTransactionManager to expose a JPA transaction + to JDBC access code that accesses the same JDBC + DataSource, provided that the registered + JpaDialect supports retrieval of the + underlying JDBC Connection. Out of the + box, Spring provides dialects for the Toplink, Hibernate and OpenJPA JPA + implementations. See the next section for details on the + JpaDialect mechanism. +
+ +
+ <interfacename>JpaDialect</interfacename> + + As an advanced feature JpaTemplate, + JpaTransactionManager and subclasses of + AbstractEntityManagerFactoryBean support a custom + JpaDialect, to be passed into the + "jpaDialect" bean property. In such a scenario, the DAOs won't receive + an EntityManagerFactory reference but + rather a full JpaTemplate instance instead (for + example, passed into JpaDaoSupport's + "jpaTemplate" property). A JpaDialect + implementation can enable some advanced features supported by Spring, + usually in a vendor-specific manner: + + + + applying specific transaction semantics (such as custom + isolation level or transaction timeout) + + + + retrieving the transactional JDBC + Connection (for exposure to + JDBC-based DAOs) + + + + advanced translation of + PersistenceExceptions to Spring + DataAccessExceptions + + + + This is particularly valuable for special transaction semantics + and for advanced translation of exception. Note that the default + implementation used (DefaultJpaDialect) doesn't + provide any special capabilities and if the above features are required, + the appropriate dialect has to be specified. + + See the JpaDialect Javadoc for more + details of its operations and how they are used within Spring's JPA + support. +